Compilers are Databases
summary
A new compiler backend called Dotty rethinks Scala compilation as a time‑indexed, functional database: every value (signatures, denotations) is keyed by runID/phaseID so edits and phase transforms become versioned queries. Core data types are immutable trees (typed vs untyped), persistent name‑references, denotations and symbols; denotations vary by period. Performance relies on aggressive caching (validity intervals, LRU cache of ~8 member entries), automatic fusion of many micro‑phases into ~5 groups, and intends to beat current scalac (~500–700 LOC/s; pathological shapeless queries can take minutes).
AI-written summary · about
chapters (26)
- 0:00Intro
- 1:30What is a compiler
- 7:44Challenges
- 15:56Latency
- 16:49Reusability
- 20:07Reactive Programming
- 22:52Core Data Types
- 26:08Type Trees
- 30:29Types
- 31:00References
- 32:06Type
- 32:38Reference
- 33:32Overload
- 34:26Imutable References
- 36:13Union Types
- 37:31Symbols
- 40:31Entity Relationships
- 42:34Lessons Learned
- 43:44Dotty
- 44:28Symbol
- 48:22Fusion Faces
- 51:09View Management
- 54:47Run ID
- 55:21Persistence
- 55:54Parallelization
- 57:11Preconditions








