Back to Hhvm

Hack Documentation

hphp/hack/manual/hack-overview.mdx

latest3.2 KB
Original Source

Hack Documentation

Getting Started

<Col50>

Getting Started

Installing Hack, running your first program, and introducing the tools.

Expressions & Operators

Expressions, operators, associativity, and precedence.

Contexts & Capabilities

Specifying capabilities and permissions for functions.

Packages

Organize files into separate builds and deployments.

Silencing Errors

HH_FIXME best practices and error codes.

</Col50> <Col50>

Source Code Fundamentals

Basic syntax, namespaces, and the autoloader.

Arrays & Collections

Immutable collections, mutable collections, and APIs.

Modules

Language support for organizing code.

XHP

Safe, composable HTML templating.

Contributing

How to contribute to this website.

</Col50> <EndCol />

Control Flow

<Col50>

Statements

Simple statements, blocks, and loops.

Readonly

Specialized feature for performantly controlling object mutability.

</Col50> <Col50>

Asynchronous Operations

Asynchronous functions, await, and the concurrent keyword.

</Col50> <EndCol />

Classes, Interfaces, Traits

<Col50>

Functions

Named functions, anonymous functions and parameters.

Traits & Interfaces

Mechanisms for code reuse and code constraint within classes.

</Col50> <Col50>

Classes

Classes provide a way to group functionality and state together.

Attributes

Attaching metadata to Hack programs, built-in attributes and defining your own.

</Col50> <EndCol />

Types & Generics

<Col50>

Types

The type checker.

Generics

Generic types, where constraints, and variance.

</Col50> <Col50>

Built-In Types

Built-in types known to the type checker.

Reified Generics

Generics with type information accessible at runtime.

</Col50> <EndCol />

Experimental Additions

<Col50>

Experimental Features

Enable features in the experimental phase.

Memoization Options

Control use of memoization and the Implicit Context

</Col50> <Col50>

Expression Trees

Typechecker support for domain specific languages.

</Col50> <EndCol />

API References

<Col50>

Built-In APIs

Full reference docs for all functions, classes, interfaces, and traits in the Hack language.

</Col50> <Col50>

Standard Library

Full reference docs for all functions, classes, interfaces, and traits in the Hack Standard Library.

</Col50> <EndCol />