TIL Option[_] isn't a higher-kinded type. It's just a type constructor. Higher-kinded types are types that abstract over type constructors (so X[F[_]]). As known as 1st order & higher-order abstraction. But best refer to the latter as "type constructor polymorphism".
-
-
Replying to @dwijnand
There isn't any consistency with what people mean when they say "HKT" these days. By most usages, type constructors *are* HKTs. Though, the way you've written it ("Option[_]") is actually just a proper type with kind *, albeit existential. "Option" would be the TC.
3 replies 0 retweets 5 likes -
Replying to @propensive @dwijnand
Yeah it seems basically a lost battle, tho I've seen
@larsr_h fight it: the incorrect usages outnumber the correct ones (and they appear even in the published literature).1 reply 0 retweets 1 like -
Replying to @Blaisorblade @propensive and
I'm not sure I understand. - Int, String, etc are nullary type constructors (*), aka proper types - Option is a unary type constructor (* -> *), as it accepts a proper type as an argument - Higher kinded type is the ability to take * -> * as a type argument, e.g. Functor[F[_]]
3 replies 0 retweets 3 likes -
Replying to @alexelcu @Blaisorblade and
Or in other words a higher-kinded type has this shape: (* -> *) -> * Anything I'm missing?
1 reply 0 retweets 1 like
Only that higher-kinded types include more complex examples, too, e.g. the kind of a type which could be parameterized on a functor.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.