ParasocialDownload on theApp Store

Developer Voices

How Would You Type-Check 30 Million Lines of PHP? (with Julien Verlaguet)

2 hr 22 min

3 min preview

Listen to the full episode

Do not have it yet? Parasocial is a podcast player by Super Simple.

About this episode

How would you manage 30 million lines of PHP? You can't rewrite it - you'd be fired long before you delivered. That was the problem facing Facebook around 2011, and their answer was to add a type system, giving birth to the Hack language. But adding types to PHP turned out to be the easy part. The hard part was building a type checker that developers used to "edit, save, refresh" would actually tolerate. So how do you type-check tens of millions of lines of code fast enough that nobody notices? Julien Verlaguet co-designed Hack at Facebook, and has spent the fifteen years since chasing a better way to build incremental systems. We start with the internals of Hack's language server - forked OCaml workers, a shared immutable heap, lock-free dependency tracking, and the months spent hunting non-deterministic bugs. From there we follow the thread to Skip, a language designed around tracking mutability in the type system, with stops at why Haskell's monads and "reactive Java" didn't fit, functors vs type classes, and Skip's bang operator for working with immutable objects. Then it's on to the Skip reactive framework: eager vs lazy collections, a garbage collector without long pauses, a

How Would You Type-Check 30 Million Lines of PHP? (with Julien Verlaguet) — Developer Voices