Introducing Hack
summary
Hack adds a static type checker to HHVM that runs as a background server, scales to thousands of files, and returns mass error results in under 200 ms (demo shows 7,000 lines of errors and a 160 ms turnaround). It supports incremental adoption via file-level strict / partial / decl modes, nullable types and generics, and defers resolution with unresolved types so common PHP patterns remain valid. Tooling includes HH client pings, editor plugins, a color mode showing checked regions, shared‑memory caching, parallel workers and fine‑grained dependency tracking.
AI-written summary · about
chapters (5)
- 0:00Start
- 8:51Hack Type System What must be annotated Class members Function parameters Return types What is inferred? All the rest
- 25:14Hack Type Inference (2) How does a type system normally work? Type variables are introduced A unification algorithm solves the type-variables usually noted
- 29:22Error Messages We can't expect the user to understand all the type inference The solution keep the reason why we deduced a type and expose it to the user
- 36:20Working at Scale: The Solution How do we make this work We parallelize We cache We do things incrementally
related talks
50mPHPNG versus HHVM
27mCompiler-Level Static Checks: Enforcing Safe Functional Dev Patterns
26mPHP, Under The Hood
37mHeap Layout Optimisation for Exploitation
34mHackett: a metaprogrammable Haskell
45mHedy: A Gradual programming language
15mPermchecker: A Toolchain for Debugging Memory Managers with Typestate
20mDeveloping a Monadic Type Checker for an Object-Oriented Language
