Featherweight Swift: A Core Calculus for Swift’s Type System
summary
Presents Featherweight Swift — a stripped-down core calculus that formalizes Swift’s protocol, class and extension typing and models method lookup and Self types, implemented as a formal semantics plus mechanized rules and validated by copy‑pasting examples into the real Swift compiler. Uses the compiler source as a reference and unit tests to probe behavior, finds a small number of real compiler bugs (including one runtime cast hole that is since fixed) and demonstrates the model matches surprising corner cases.
AI-written summary · about
chapters (10)
- 0:00Intro
- 0:14What's Swift?
- 1:03Parser combinators
- 4:35What features did we use?
- 5:07What's the problem?
- 7:17Featherweight Swift
- 8:24Name Lookup Mechanism
- 9:53How is this useful?
- 11:30Featherweight vs complete
- 12:02References








