Adding Kind-polymorphism To The Scala Programming Language
summary
Argues Scala needs kind-polymorphism so generic derivation can move out of macros into the compiler, enabling shapeless-style features without fragile macro internals. Shows a working typelevel Scala prototype and an experimental Dotty -Y flag implementation that accept type parameters of any kind; poly-kinded type parameters work, but polytype application (applying poly-kinded constructors to arguments) remains unimplemented. Result: prototype compiles and is usable for many cases, it revives interest and points to follow-up work to finish poly-application and land a full poly-kinded generic primitive.
AI-written summary · about
chapters (8)
- 0:00Introduction and background
- 8:54Macros in Scala ecosystem
- 16:00Kind polymorphism explained
- 22:52Generic type classes in Shapeless
- 32:04Need for kind polymorphism
- 37:31Proof of concept implementation
- 46:57Current status and future work
- 50:17Q&A
related talks
43mAdding kind-polymorphism to the Scala programming language
42mPolymorphic Function Types in Scala 3
45mHow to be polymorphic in Scala
40mPolymorphic Function Types in Scala 3
41mPolymorphism in Scala
01h 01mThe Shape(less) of Type Class Derivation in Scala 3
32mUnderstanding the Type System of Scala 3
30mDotty and types: the story so far
