Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone motivate why Arrow (Kotlin) choose to deprecate higher-kinded types?

Digging into the codebase of Arrow I found this deprecation warning above higher-kinded types.

Higher Kinded types and their related type classes will no longer be supported after Arrow 0.13.0. Most relevant APIs are now concrete over the data types available as members or top level extension functions

Can anyone motivate this choice and the proposed alternatives? Or point me to some relevant documentation on this topic?

like image 772
Luca Piccinelli Avatar asked Dec 18 '22 11:12

Luca Piccinelli


1 Answers

Raul Raja wrote this about it on the Arrow-channel in the Kotlin-slack:

For those wondering about the future of Higher Kinds in Arrow: Kinds are going away because their encoding forces the user to call .fix() and there is no workaround for it without compiler plugins. Once compiler plugins are properly supported perhaps after 1.5 then we will revisit kinds but instead of providing all this boilerplate we will provide a deeper and better integration than what we have now. Arrow Meta already has this support but it can’t be distributed to users until the Kotlin IDEA plugin supports compiler plugins. Kinds will be revisited then. Since Arrow is currently marching close to the final encoding of 1.0, we can’t release a 1.0 where the entire lib and most of user code depends on Kinds in the current form and commit to maintain that for the long run.

like image 199
marstran Avatar answered Jan 23 '23 13:01

marstran