Adding kind-polymorphism to the Scala programming language
summary
Proposal: add universal kind polymorphism so generic derivation handles type constructors of arbitrary kind instead of only and ->. Prototypes live in typelevel Scala and in Dotty, implemented via AnyKind bounds and a GADT-style type-apply encoding plus synthesized bridge methods. Result: library authors get simpler, more uniform Generic derivation* and can auto-derive things like FunctorK and partial-to-complete transformers; it is experimentally working but needs SIP, type-inference tweaks and ergonomic polishing before wide adoption.
AI-written summary · about
chapters (7)
- 0:00Start
- 1:15Background
- 5:12Non-portable macros
- 7:19What kinds are representable?
- 17:14Can we abstract way the differences?
- 22:56Introducing kind polymorphism
- 37:23Other kinds
related talks
43mAdding kind-polymorphism to the Scala programming language
42mPolymorphic Function Types in Scala 3
40mPolymorphic Function Types in Scala 3
30mDotty and types: the story so far
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
49mFrom DOT to Dotty
42mDOT: Scala Types from Theory to Practice
20mAll Your Base Are Belong to Us: Sort Polymorphism for Proof Assistants
