Kindly Bent to Free Us
summary
Affe is an ML extension that enforces single-use and drop-able resources by inferring linear and affine kinds and lexical regions and solving constrained-kind constraints; it supports exclusive and shared borrowing (Rust-like lifetimes) without requiring linearity annotations. The prototype typechecker infers kinds, finds borrow regions with a heuristic, simplifies huge constraint schemes, and rejects borrowers that would escape or conflict; examples typecheck, but non-lexical lifetimes and concurrency support are not yet implemented.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 0:43Chrome memory safety
- 2:11Cafe language and linear types
- 4:41Type system design
- 6:52Motivation for the system
- 9:00Extending with kinds
- 10:23Resources in closures
- 12:49Borrowers role
- 15:16Linearity purpose
- 17:03Safety rules for borrowers
- 18:31Borrower lifetime scope
- 20:18Nested regions inference
- 22:04Key value store API
- 23:53Functional programming in Cafe
- 25:43Type inference constraints
- 27:11Prototype limitations
- 28:13Q&A
