Hands On Capture Checking with Martin Odersky
summary
Live coding uses the Scala nightly compiler and local nightly artifacts to exercise the experimental capture-checking feature; concrete examples include a withFile resource example that reliably fails when an OutputStream is captured, and a secret opaque-type workaround where an opaque String must become a case class because pure types cannot carry capture sets. The presenter spends a week learning it, demos code that compiles or rejects as expected, surfaces noisy error messages, and provokes a follow-up PR fixing usability issues after a 1.5‑hour session.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 7:40Capture and implications
- 10:35Resource management
- 14:09Preventing secret leakage
- 21:15Dependent types mechanics
- 28:40Transitive capture rules
- 32:16Pure types restrictions
- 34:24Subcapturing compatibility
- 38:49Capture inference
- 40:14Q&A
related talks
01h 03mInside the Scala Capture Checker
31mReal-Life Scala Capture Checking
01h 03mWhere Are We With Scala's Capabilities?
01h 23mCapture Tracking in Scala
41mWhere Are We With Scala's Capabilities?
20mSystem Capybara: Capture Tracking for Ownership and Borrowing
24mLet the Scala compiler work for you
40mScala Meta Live Coding Session
