Type Classes in Kotlin?


#1

Does Kotlin support type classes in any way? If so, can someone point me to an example? Thanks!


#2

Kotlin doesnot support type classes at the moment. In fact, there's no clear plan regarding this, in particular, type classes will not be supported in the version 1


#3

Thanks for clarifying. Although I do enjoy type classes in Scala, they are a little obscure in the implementation and I would hope that Kotlin makes it easier if it implements them. In any event, type classes are the last chapter in Atomic Scala so it's easy to leave them off.


#4

FYI, I just posted a few thoughts on this topic:


#5

There is now a KEEP for type classes for those of you interested https://github.com/Kotlin/KEEP/pull/87