What's so hard about writing a type checker? A tour of ty
summary
Gives concrete engineering details: a real implementation called ty written in Rust that uses Salsa for memoized, incremental query-based computation, a semantic index of per-file use‑def chains, and DNF set operations to support set-theoretic types (unions, intersections, negations). Shows how laziness, source-stable AST ids, and selective diagnostics keep editor feedback snappy, and describes tradeoffs and what’s actually implemented versus experimental. Watch if you want how it’s built and why it performs; skip if you only want high‑level promises.
AI-written summary · about
chapters (10)
- 0:00TY purpose
- 1:31How TY works under the hood
- 3:17Lazy and incremental checking
- 8:56Salsa architecture
- 15:41Control flow and use-def chains
- 23:03Type inference
- 29:42Sum types and narrowing
- 32:32Diagnostics and error context
- 37:48Diagnostic performance
- 38:34Contributing to TY and Q&A
related talks
27mGradual Typing in Practice
31mTaming the Duck with Type Hints
46mHow to make a static type checker your best friend
32mType-checked Python in the real world
03h 38mPython Types for Fun and Profit
09mCollaborating with your computer using typed holes!
30mTyping at scale: statically type-checking a large codebase
42mKeynote – Łukasz Langa
