https://kotlinlang.org logo
Title
r

raulraja

04/03/2017, 10:22 PM
Are there any plans to support either Higher Kinds, implicits or some kind of typeclass support in Kotlin?
🙂 1
🙃 1
d

dh44t

04/03/2017, 11:01 PM
AFAIK no, no plans for those features is planned
r

raulraja

04/03/2017, 11:04 PM
😞
a

Andreas Sinz

04/04/2017, 9:54 AM
@dh44t @raulraja they plan to implement something similar https://discuss.kotlinlang.org/t/extension-types-for-kotlin/1390/26
d

dh44t

04/04/2017, 9:56 AM
Indeed, read it when it was fresh. Dunno how long will it take. I reckon that there are other concerns now
r

raulraja

04/04/2017, 12:37 PM
that wouldn't solve the issue to obtain values from types that are generic and parameterized right?
For example if you wanted to get
Monoid<F>
where F is sometimes String or Int. There is currently no way in Kotlin to write any kind of polymorphic code without emulating HigherKinds like derive4j
Monoid perhaps is not a good example but
Monad<F>
where F is something like
List
We can't refer to Higher Kinds without emulating them and there is no way for me to generically get an instance of a Monad<F> without explicitly passing it around. This makes typed FP in Kotlin not very practical at the moment.
Also @dh44t I looked at funKTionale, great stuff 👏
d

dh44t

04/04/2017, 12:54 PM
Thank you, WIP still, may things to refine and document