The first steps towards practical capture checking
summary
Nightly Scala 3 builds already implement capture checking and a full capture-checked Scala API and a Gears capture-checked port exist as proofs of concept; separate compilation mostly works but uncaptured Java boundaries and lazy views reveal real leaks. The collection port touches ~700 functions out of ~6,200 (~10%) and about 1,500 of 32,000 lines, and compile overhead is ~15% of the typer. Boundary labels and futures are tracked and cause compile errors when they would otherwise leak at runtime.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:48Capture checking in Scala
- 4:15Scala collections challenges
- 9:21Quiz: Capture sets
- 12:43Strict vs lazy collections
- 14:48Capture-checked zip/unzip
- 17:18Java interoperability
- 19:10Backwards compatibility
- 23:51Practical exercise
- 27:35Summary of changes
- 29:49Boundary break in Scala 3
- 33:27Label capture safety
- 36:43Results library errors
- 39:12Gears concurrency
- 41:42Key takeaways
- 42:47Q&A
related talks
01h 03mInside the Scala Capture Checker
01h 03mWhere Are We With Scala's Capabilities?
01h 23mCapture Tracking in Scala
31mReal-Life Scala Capture Checking
41mWhere Are We With Scala's Capabilities?
01h 02mSimply Scala
20mSystem Capybara: Capture Tracking for Ownership and Borrowing
21mReasonable Scala Compiler
