The Hack language
Hack has deep roots in PHP. In fact, most PHP files are already valid Hack files. We made a conscious choice not to support a handful of deprecated functions and features that were incompatible with static typing (e.g. “variable variables” and the extract() function). We have also added many new features that we believe will help make developers more productive.
Our principal addition is static typing. We have developed a system to annotate function signatures and class members with type information; our type checking algorithm (the “type checker”) infers the rest. Type checking is incremental, such that even within a single file some code can be converted to Hack while the rest remains dynamically typed. Technically speaking, Hack is a “gradually typed*”* language: dynamically typed code interoperates seamlessly with statically typed code.