Getting StartedInstalling Hack, running your first program, and introducing the tools.
Source Code FundamentalsBasic syntax, namespaces, and the autoloader.
Expressions And OperatorsExpressions, operators, associativity, and precedence.
Arrays And CollectionsImmutable collections, mutable collections, and APIs.
Contexts And CapabilitiesSpecifying capabilities and permissions for functions.
ModulesLanguage support for organizing code.
XHPSafe, composable HTML templating.
Silencing ErrorsHH_FIXME best practices and error codes.
ContributingHow to contribute to this website.
StatementsSimple statements, blocks, and loops.
Asynchronous OperationsAsynchronous functions, await, and the concurrent keyword.
ReadonlySpecialized feature for performantly controlling object mutability
Classes, Interfaces, Traits
FunctionsNamed functions, anonymous functions and parameters.
ClassesClasses provide a way to group functionality and state together.
Traits And InterfacesMechanisms for code reuse and code constraint within classes.
AttributesAttaching metadata to Hack programs, built-in attributes and defining your own.
Types and Generics
TypesThe type checker.
Built In TypesBuilt-in types known to the type checker.
GenericsGeneric types, where constraints, and variance.
Reified GenericsGenerics with type information accessible at runtime.
Experimental FeaturesEnable features in the experimental phase.
Expression TreesTypechecker support for domain specific languages.
Memoization OptionsExperimental feature for controlling use of memoization and the Implicit Context
Built-in API Reference
Full reference docs for all functions, classes, interfaces, and traits in the Hack language.
Standard Library API Reference
Full reference docs for all functions, classes, interfaces, and traits in the Hack Standard Library.