Josh Watzman

Heresy! Combining Type Systems with PHP
Panel Discussion

Heresy! Combining Type Systems with PHP

Hack is Facebook's dialect of PHP. One of the major features of Hack is its strong, static type system. This technical talk describes how Hack adds a type system onto a dynamic, untyped language like PHP. The talk goes into detail on both the type system as well as the static typechecker that enforces it. In particular, the talk focuses on how Hack does all of these things without compromising the core of what makes PHP an incredibly productive language to work in.

Talk objectives: discuss some of the design decisions and tradeoffs that went into designing Hack's type system to lie on top of the existing PHP language, as well as some of the implementation complexity that arises when a typechecker needs a sub-second response time on a codebase with tens of millions of lines of code.

Target audience: anyone interested in programming language design, type systems, evolving legacy codebases, PHP, or scaling problems with any of those. The talk assumes fluency with general programming concepts, but not advanced knowledge of any of the above topics.

Panel Discussion

Tony Hoare will open with a 10 minute summary of language features proposed during his career. Each feature was motivated by the desire to reduce the range of programming errors by increasing the range of errors discovered at compile-time and ensuring that those which slip through can be detected and isolated at run-time. Then he and Bruce Tate will introduce the panel and ask the language inventors to give a five minute introduction of their language answering questions like:

* Was ease of writing correct programs and debugging incorrect ones important to the market segment (ecological niche) at which your language was aimed?

* Which particular features of your language met this goal, or tried and failed?

* For what features was correctness sacrificed in the pursuit of alternative goals – eg. compactness, familiarity, compatibility, efficiency, etc?

* In the light of hindsight, what would you have done differently, and why or why not?

This will be followed by a discussion amongst inventors of languages such as F#, Erlang and Hack.

About Josh

Josh Watzman is a software engineer at Facebook, joining right after completing CMU's undergraduate CS program. After working in Facebook's frontend on news feed, he felt the pain of working in a completely untyped language, and joined the Hack team in order to help the conversion effort. With the conversion at Facebook largely complete, he's involved in the open-source side of Hack, and loves bringing the joy of the language to as many people as possible.

Twitter: @jvwatzman

Back to conference page