The Simple Essence of Overloading: Making ad-hoc polymorphism more algebraic with(…)
summary
Claims that overloads are representable as explicit choices so constraint collection, solving, and resolution stay separate, using a flow-based variational framework that produces a variational constraint graph annotated with invalid worlds. Implements a solver via BDDs, counts assignments and finds the unique valid world, and ships a Rust prototype with artifacts. Compares to Swift: handles return-type overloading cases where Swift times out and scales well on artificial benchmarks, demonstrating practical modular overload resolution.
AI-written summary · about
chapters (10)
- 0:00Overloading introduction
- 1:04Backtracking overload resolution
- 2:29Backtracking problems in type checkers
- 3:12Modular overload resolution desire
- 3:32Overloads with type variables
- 6:44Variational graphs for overloads
- 7:46Valid worlds for overloads
- 8:27Swift performance comparisons
- 9:30Summary of overloading
- 9:50Q&A
related talks
21mPolymorphic Type Inference for Dynamic Languages
55mCustom Overload Sets and Inline SFINAE for Truly Generic Interfaces
01h 21mNon-local compiler transformations in the presence of dynamic dispatch
20mPrincipal Type Inference under a Prefix: A Fresh Look at Static Overloading
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
01h 00mDynamic Polymorphism with Metaclasses and Code Injection
24mExistentialize your Generics
30mLayout Polymorphism: Using static computation to allow efficient polymorphism over...
