Inside the Scala Capture Checker
summary
Scala compiler now runs a separate pass after typing that computes and enforces capability flow: implicit capability arguments model effects, boxed generic parameters hide captures and unbox on access, and capture tunneling preserves safety across containers. The implementation lives in scalac as a setup + check phase (opt-in via an import), rechecks stdlib collections and futures, and reports small annotation overhead while running roughly as long as the typer. Types carry explicit capture set constraints solved by incremental propagation.
AI-written summary · about
chapters (8)
- 0:00Scala Capture Checker intro
- 1:03Why capture checking matters
- 15:52Resources and effects
- 28:11Effect polymorphism
- 35:17Type system foundations
- 44:15Capture checking with generics
- 51:59How capture checker works
- 1:00:03Results and future
related talks
38mCapture Checking - A New Approach to Effect Safety in Scala
49mThe first steps towards practical capture checking
01h 03mWhere Are We With Scala's Capabilities?
01h 23mCapture Tracking in Scala
41mWhere Are We With Scala's Capabilities?
20mCapturing Types (TOPLAS)
31mReal-Life Scala Capture Checking
41mHands On Capture Checking with Martin Odersky
