If I understand correctly, Kind<A, B> is jus...
# arrow
c
If I understand correctly, Kind<A, B> is just a Kotlin-friendly way of saying A<B>, right?
s
Yes, that’s the short answer 😄 The long answer is that you can’t model the container type in a generic way in Kotlin. Or Kotlin doesn’t have support for higher kinded types.
c
Actually everything makes a lot more sense when I think about it this way 😅
Does that mean a ‘best case scenario' for the future of Arrow would be to add these kind of generics to the Kotlin compiler? That would make pretty much everything in Arrow straightforward, right?
Although JetBrains probably won't put that very high on the list of stuff to do
s
Yes, that’s probably not high on their list but it’s on ours 🙂 Many people are working on #arrow-meta which would enable this through a compiler plugin which you can just add in gradle 🙂 Arrow Meta is a high level companion library to the compiler for building compiler plugins, or do code generation etc.
c
That is very interesting 😇
I think the syntax might be one of the things that worry people about Arrow (especially if their only experience of FP is Haskell...)
s
There is a recording of me & @raulraja talking about it @ Lambda World

https://www.youtube.com/watch?v=WKR384ZeBgk

And also 2 other colleagues of mine speaking about it @ KotlinConf

https://www.youtube.com/watch?v=n9smQNxUyBI

Yes, completely agreed. We’ve spend a lot of time thinking about that and found some good solutions that’ll help us fix that and release 1.0 this year
c
Thanks for the links ^^ Will 1.0 be Multiplatform, or will it come afterwards?
s
That’ll depend on contributions etc but we hope so yes. We’re mostly blocked by annotation processing, and some small things which will be solved with arrow-meta. After that’ll we’ll go MPP asap, but some projects will be harder to migrate then others. I.e. creating
CoroutineContext
for native and JS is required for
Arrow Fx
but
Arrow Core
is much simpler since it’s mostly vanilla Kotlin it can be MPP right away.