Guest Lecture: Andrew Kennedy

The Hack Programming Language:
Types for PHP

Andrew Kennedy

3–4pm Friday 18 November
Gaddum Lecture Theatre G.8
1 George Square

Facebook’s main website, ads platform, and much of its internal tooling is implemented in PHP, a language not known for elegance or best practice in programming language design. (See, for example.) Over the last three years Facebook has embarked on an ambitious project to migrate its code base to Hack, which takes the syntax of PHP, removes the worst features, and adds static typing and modern constructs for asynchronous programming and typed UI components. In this talk I will focus on Hack’s type system, which combines ML-like type inference, object-oriented generics in the style of C# or Java, and flow-based typing of local variables.


Andrew Kennedy is a software engineer at Facebook London working on the Hack team. Before joining Facebook in January this year he spent 16 years at Microsoft Research, during which time he helped design and implement the generics feature for the .NET Common Language Runtime and polymorphic units-of-measure inference for the F# programming language, in addition to making many research contributions in type systems, semantics, formal verification and compilation.