Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@dder in short we’re talking about type abstraction here. Higher kinded types are a way to generically abstract over entities taking type consructors.
-
@dder I take this as you not being quite familiar with FP concepts? But no, it’s more like the type of types kind, with kind of the same power as generic types in other langs w/o sacrificing type safety, or type integrity. @SortOfTested, help me out here, please. I’m not very good at explaining these things. I could try with functors and monads, but...
The best I can give is when we have and ordinary type, written as *, we can have a unary type which has kind * -> *, while higher-kinded types have a kind like (* -> *) -> * - and I realise that is NOT a very good explanation, but I can’t come up with a better one right now -
dder23234y@100110111 Ehm, a function returning a function ? And we are talking about the type of the outer outer function ?
Sortof (pun intended) like a factory ?
Like:
GetArtithmetic(“+”) could return a function of type “(int, int)-> int”
Where as that higher kinded type could be “(string)-> ((int, int)-> int)”
? -
@12bitfloat higher-kinded types are more like generics on generics.
@dder I think that’s probably the best way to put it. Taking C# as a reference you can easily have List<T>, but you’d need hkt to get List<T<U>>. Kinds are ”types” of types, and a type would be higher-kinded when they are higher-order functions on type level typed using kinds.
Related Rants
-
InvisibleMe21"Pythonists don't comment, they write readable code." Yea, tell that to the list comprehension with three lam...
-
ddash1237The best motivation to quit Image Classification... x_x
-
NoMad8Assembly... Do I really need to say more? Okay, it's low level so there is no abstraction. All you deal with ...
The lack of higher kinded types.
rant
wk239