Hey everyone! Raul and I have been thinking about ...
# arrow-contributors
p
Hey everyone! Raul and I have been thinking about some of the feedback about naming convention, specifically about the higher kind emulation machinery. We have come up with a proposal to patch the names to something more understandable. The changes are: * The interface
HK
becomes
Kind
.
HK2
will be
Kind2
,
HK3
is
Kind3
, etc * The witness types will go from being suffixed with
HK
to being prefixed with
For
* The typealias of
HK<OptionHK, A>
(now
Kind<ForOption, A>
) goes from being
OptionKind<A>
to
OptionOf<A>
* The evidence/evaluation function will go from
ev()
to
value()
. The existing extension functions named
value()
, i.e. in Id, will become either
result()
or
content()
depending on the semantics of the datatype. Here are a few examples of how these changes will look like:
HK<F, Int>
->
Kind<F, Int>
HK<OptionHK, Int>
->
Kind<ForOption, Int>
OptionKind<Int>
->
OptionOf<Int>
Monad<OptionHK>
->
Monad<ForOption>
OptionKind<ListKind<A>>
->
OptionOf<ListOf<Int>>
HK<OptionHK, HK<ListHK, Int>>
->
Kind<ForOption, Kind<ForList, Int>>
HK<HK<EitherHK, Throwable>, Int>
->
Kind<Kind<ForEither, Throwable>, Int>
HK2<EitherHK, Throwable, Int>
->
Kind2<ForEither, Throwable, Int>
Option.monad().binding { 1 }.value()
👍 2
🎉 5