- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

- 19:55bishabosha synchronize #8865
- 17:51mkeskells synchronize #9102
- 17:29som-snytt commented #10494
- 16:27mkeskells review_requested #9102
- 16:27scala-jenkins milestoned #9102
- 16:27mkeskells opened #9102
- 15:33sasanjoy commented #10494
- 15:17bishabosha synchronize #8865
- 15:03bishabosha synchronize #8865
- 13:33mwielocha synchronize #9101
- 13:10mwielocha synchronize #9101
- 12:55mwielocha commented #9101
- 12:30scala-jenkins milestoned #9101
- 12:30mwielocha opened #9101
- 12:28mwielocha opened #12069
- 11:13mkeskells synchronize #8970
- 07:21
lrytz on 2.13.x

ArrayDeque.alloc doc: do not us… Merge pull request #9099 from u… (compare)

- 07:21lrytz closed #9099
- 07:18
lrytz on 2.13.x

[bug#10131] Stop leaking head i… Merge pull request #9098 from N… (compare)

- 07:18lrytz closed #9098

that's the explanation I use for kinds

first of all, talking about kinds in Scala is a bit weird, the notation is not great

so I'm going to use Haskell notation, which is std, and show you the translation to scala

basically it starts with types

a type is a compile time label that's attached to a term (a term is a value like 1 or "hello" or

`map`

), which can be used to statically prove the absence of certain behaviour
similarly, there are labels to classify *types* themselves

these labels are called

`kind`

s
traditionally, a kind system is quite simple

imagine there is no subtyping

like in Haskell

e.g. if I tell you type

`Int`

, you know that `1`

is a value
if I tell you

`String`

, you know that "hello" is a value
if I tell you

`Option[Int]`

, you know that `None`

and `Some(4)`

are values
and so on

but what about the type

`Option`

you can't create a value of type

`Option`

, option of what?
you need further information

if I tell you

`Option[Int]`

, then you know
so the type Option needs to know about another type

so Option is said to have kind

`* -> *`

which you can read as a function at the type level

`Option`

has kind `* -> *`

because it takes a concrete type (i.e. a type of kind `*`

, e.g. Int), and returns another concrete type (i.e. a type of kind `*`

, i.e. `Option[Int]`

)
does that make any sense at all?

a

`* -> *`

is like a function taking a type as an argument and returning a type?
`Type -> Type`

might make it a bit easier, I'm just used to

`*`

by now
and the same is true of types

spoiled that, sorry :)