Nick Benton

Combining Static and Dynamic Types in Hack

Hack is the language that powers the 'business logic' of Facebook. It has evolved from PHP, most significantly via the addition of an expressive type system. Nearly all of our very large codebase is now statically typed but there are still places where type errors are supressed, which means we cannot fully trust the type information. We aim to achieve soundness for the whole codebase by introducing a novel form of sound gradual typing and using that to selectively weaken the claims made by some of the type annotations. This talk will describe how we combine static and dynamic typing in Hack without introducing costly new runtime checks or throwing away the benefits of our existing types, as well as an associated semantic soundness result formalised in the Coq proof assistant.

back to overview

Watch Recording

 

Biography

Nick Benton is an Engineering Manager at Meta, supporting the Continuous Verification Lab in London and the ReaLM programming languages research group in Paris. His research interests range from proof theory and categorical logic, through semantics of programming languages and static analyses, to programming language design and compiler implementation. He has worked on term calculi and categorical models for linear logic, compilation of functional languages to the JVM and .NET, extending C# with join calculus concurrency, monads and effect systems, models for dynamic allocation, compositional compiler correctness, mechanically formalized logics for reasoning about machine code programs, and reactive programming. He joined Meta in 2017 after 18 years as a Researcher at Microsoft Research in Cambridge.