Keynote: Set-Theoretic Types from Scratch
summary
Elixir v1.20 adds whole-program type inference and the live code builds a minimal set theoretic type engine in ≈30 lines that actually runs and tests. It defines three indivisible types binary, integer, float, top term and bottom none, implements union/intersection/negation plus difference, property tests (De Morgan, subtype, disjoint) and passes them, models singleton atom types as {polarity, MapSet}, and uses a (static,dynamic) tuple to express gradual success typing for pattern matching and function application.
AI-written summary · about
chapters (18)
- 0:00Introduction and motivation
- 1:47Building types from scratch
- 5:27Implementing union and intersection
- 10:22Adding negation and difference
- 15:12Helper functions and subtypes
- 16:36Pattern matching and case expressions
- 18:44Function application and subtyping
- 22:13Success typing and gradual types
- 27:08Challenges with singleton types
- 36:39Composite types and complexity
- 40:15Timeline and future work
- 43:22Acknowledgments and closing
- 44:09Q&A: Dynamic types explained
- 48:07Q&A: Static vs dynamic usage
- 50:40Q&A: Typing of pairs
- 54:26Q&A: Dynamic type precision
- 58:43Q&A: Future language features
- 1:01:16Q&A: Role of dynamic types
