3 ms·
Kotlin extension methods are basically just type classes but without the theory.
by xmcqdpt2 3y ago
Kotlin extension methods are basically just type classes but without the theory.
- Tainnor 3y agoUh, I don't get this. Extension methods are ultimately just syntactic sugar, everything written as an extension method could just be written as a top-level function taking the receiver as an extra parameter. I would say the analogous feature to typeclasses are interfaces.