raulraja
04/01/2018, 11:16 PMHK<OptionHK, A>
over Kind<ForOption, A>
or its short form OptionOf<A>
?
And ultimately what would you propose as a better name of none of those make sense currently?noncom
04/02/2018, 4:14 PMHK<OptionHK, A>
is that it is exactly what it reads. The new naming substitutes one concept and its natural name HK
with three different names Kind
, For
and Of
. Now in order to understand what actually is behind a particular word of the three and its implementation of a higher kind, one has to remember that the word For
or Of
means higher kind
and then think of how a higher kind (one concept) is interpreted and named in each particular situation. For each of these situations you have to build a separate explanation.
I don't understand how it will help non-FP people because the naming will lead them even more astray. The naming won't affect them if they use the library only for its datatypes. But how are you going to explain the difference between Option<A>
and OptionOf<A>
which both are perfectly valid English and mean the same thing, to such people? Just say something like "hey, just use Option<A>
, you'll never need OptionOf<A>
because you don't understand type theory anyway"? And from the pov of English EitherOf
does not shine either.
And if they somehow get into working with higher kinds, they have to learn the theory anyway. And if they learn the theory, you'll have to explain to them that OptionOf<A>
is really a "higher kind for higherkind-option of A", which means HK<OptionHK, A>
which is exactly what it was before the renaming? So, you have enumerated several examples of how higher kinded types were named in various places. Well, now you can add at least 2 more to them.
As for me, I can't see a better name than it used to be with HK
. It was minimal, it was functional, it was clear. I kinda understand that Kind<ForOption, A>
should be read as something like "higher kind for option of A", but beginning class names from auxiliary words like "for" and "of" is something that is not usually done, and for a good reason. Perhaps, if HK
is bad, then simply Kind
is a better alternative to substitute it with.
Why it terrifies me: because in my opinion it makes it harder to read, it disinforms people, and it does not encourage them to learn and understand. And that the decision was made for a library that has a definitive place in such an important language as Kotlin.
Now, I have expressed my concerns upon encountering this. I think that if you do this, you see good in this. The only good that I've heard is that it will help to popularize the library. Well, I guess you have the right to do it this way. I think that some people will like it and others will adapt. But this is distortion.noncom
04/02/2018, 4:15 PMnoncom
04/02/2018, 4:31 PMpakoito
04/02/2018, 5:25 PMIt was minimal, it was functional, it was clear.It was not clear for anyone who didn’t come from an FP background. We got plenty of complaints over a whole year and it was hurting adoption. That’s it all boils down to.
pakoito
04/02/2018, 5:37 PMpakoito
04/02/2018, 5:43 PMraulraja
04/02/2018, 6:09 PMKind<F, A>
-> A Higher Kind value
ForData
-> Type in Higher Kind Position. Ex: Functor<ForData>
DataOf<A>
-> Non concrete but known data value in higher kind position. Alias for Kind<ForData, A>
DataPartialOf<A>
-> Partially applied type constructor, appears in kinds with arity > 1isto
04/13/2018, 4:06 PM