A Dictionary-Passing Translation of Featherweight Go
summary
Paper gives a dictionary-passing translation from Featherweight Go to a simple untyped functional target and claims it preserves dynamic behavior of programs. Interfaces become pairs (underlying value, dictionary) and overloaded methods become dictionary lookups; concrete methods get unique target names and pattern matching unpacks interface values. Translation is type-directed, covers structural subtyping and discusses type assertions, and semantic correctness is proved using step-indexed logical relations. Target is untyped and the implementation approach is shown to be correct though proofs are nontrivial.
AI-written summary · about
chapters (13)
- 0:00The Go programming language (2009)
- 0:51Featherweight Go (FG)
- 1:44Dictionary translation of type classes
- 2:35Dictionary translation of Featherweight Go
- 3:18Our work
- 4:01Go: C style syntax but ... C example
- 4:40Overloaded methods
- 5:46Translating methods
- 6:50Plain method overloading is limited
- 7:34Interfaces
- 9:43Translating definitions
- 10:29Translation guided by structural subtyping
- 11:38Summary
related talks
23mGeneric Go to Go: Dictionary-Passing, Monomorphisation, and Hybrid
16mFeatherweight Go
34mTyping [Generic] Go
12mFeatherweight Swift: A Core Calculus for Swift’s Type System
21mFunctional Go?
01h 02mPolyglot Programming through Foreign Function Interfaces
39mEverything You Always Wanted to Know About Type Inference
42mFunctional interpreters and you
