Hi meta folks :wave:, Ive been working hard on the...
# arrow-meta
m
Hi meta folks 👋, Ive been working hard on the later chapters of the FP in Kotlin book and am deep into higher kinded type territory 😁 I've written all the code samples using the
Kind
interface, surrogate types, boilerplate etc. Is there an easier way to express HKTs with Arrow Meta yet? I remember there being some talk about making them easier to use with Arrow Meta in the past, but just not sure if this has progressed at all.
r
Hi Marco, yes it has improved in meta in terms of removing the need for fix() and being able to kind ad-hoc any data type from a third party without a wrapper. Currently we are working on automating it but we have made new polymorphism related features.
Meta now supports kinds, union types, refined types, extension and coercion functions and `given`as coherent implicits
is not yet released to the general public as the IDE piece is being finished
but those tests prove the features I was mentioning
the bottom line is that when it’s finished the kind encoding is synthetic and you never have to refer to it
instead you would use synthetic markers like F<A> vs Kind<F, A> but we are not there yet because we are aiming for top level abstract functions which remove the need for kinds in the Kind emulated encoding and for structural row polymorphism to comply to those based on members or extension functions.
arrow 1
so essentially we are close to eliminating kinds all together because they would not be necessary as encoded
The current kind encoding in meta does not require you extend kind and therefore uses an inline erasable runtime to kind any value
If you need a tour of features that may impact the book let me know and I’ll be happy to show you
m
Thanks @raulraja, that is very helpful. In the short term I will keep using
Kind
in the book, then closer to publishing time (and when the meta plugin goes GA) I will rewrite the parts using the new way using
F<A>
. Do you have an idea when this will be ready to help me plan?
r
we are waiting for IR to be stable in the compiler and become the default to release the first stable release of these features
It was supposed to happen around 1.4
m
Awesome, so do you think it would be ready around August/September? That is what the current finish date is for the book, which would give me a chance to revisit those sections.
BTW, I would love a tour of all this stuff if you have some time next week.
r
I hope so, because initially we thought it was gonna be april and all the sudden in 1.3.7 the IR plugins broke. Also Google still has pending upstream changes to push
@marc0der of course, I’ll be happy to show the features on a hangouts or meet
👍 1
m
Worst case we will roll out the book with
Kind
, which still works. It would just be nice if we could show people how it should be done 🙂