Polymorphism Unbound
summary
Claims that polymorphism is essentially a type that represents multiple types and demonstrates concrete examples and tradeoffs across C++, Java, Python, Kotlin, Scala, Rust and Go. Provides runnable examples in GitHub repo: polymorphism Unbound and shows what compilers actually check: C++ templates and Kotlin generics compile time, JVM erasure that prevents returning precise types, Scala 3 and Python unions with exhaustiveness checking and Python structural typing that fails at runtime. Rust compiler helps debug examples so the patterns actually compile or fail.
AI-written summary · about
chapters (6)
- 0:00Start
- 3:06How did we get here?
- 14:28Subtype Polymorphism
- 17:16Multiple Inheritance
- 21:40Parametric Polymorphism (Generics)
- 38:41Code Reuse with Inheritance
related talks
11mThe Secrets of Polymorphic Variants
01h 01mConcepts vs Typeclasses vs Traits vs Protocols
49mThe Trouble With Types
22mSubtyping is Overrated
22mIs Space-Efficient Polymorphic Gradual Typing Possible?
31mNothing Generic About It
38mType Systems - The Good, Bad and Ugly
19mBidirectional Higher-Rank Polymorphism with Intersection and Union Types
