~/talk

Real-Life Scala Capture Checking

Talkat Scalar 2026 · 2026-03-26..03-27· [scala]
links:none on file
slides:none on file

Live-coding shows Scala’s experimental capture checking catching a real bug: a payment gateway returned inside a lambda escapes its scope and causes an error when invoked later. The compiler enforces capture sets so values tied to resources (a rate service, gateway) cannot leak, and distinguishes thin arrow (pure) vs thick arrow (impure) function types. The demo builds a payment/receipt flow, reproduces a pay‑later failure, and proves the compiler rejects unsafe captures so the code fails fast rather than silently misbehaving.

AI-written summary · about

  1. 0:00Capture checking in Scala
  2. 1:48Payment service use case
  3. 6:46Refactoring to generic processor
  4. 8:54Resource leak bug demo
  5. 13:32Tracking values in scopes
  6. 16:00Dynamic fee functions
  7. 20:20Pure vs impure functions
  8. 23:49Capturing resources in functions
  9. 24:32Capture set types
  10. 30:38Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.