Type Classes in Kotlin?

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

1 Like

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

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.

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

There is now a KEEP for type classes for those of you interested Compile-time Extension Interfaces by raulraja · Pull Request #87 · Kotlin/KEEP · GitHub

1 Like