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

- 10:23
NthPortal on 2.13.x

Make LazyList.cons.apply lazier Merge pull request #9095 from N… (compare)

- 10:23NthPortal closed #9095
- 09:24NthPortal commented #10131
- 09:23scala-jenkins milestoned #9098
- 09:23NthPortal opened #9098
- 09:10NthPortal commented #10131
- 09:10NthPortal commented #10131
- 08:24NthPortal commented #10131
- 08:20NthPortal milestoned #10131
- 08:20NthPortal demilestoned #10131
- 08:20NthPortal assigned #10131
- 08:20NthPortal commented #10131
- 07:59counter2015 commented #10131
- 06:51akshaan synchronize #9097
- 06:48akshaan synchronize #9097
- 06:45akshaan synchronize #9097
- 06:42dwijnand commented #715
- 06:42scala-jenkins milestoned #9097
- 06:42akshaan opened #9097
- 04:38retronym edited #715

Or what you pack them into.

no pun intended

the 1-kind, 2-kind thing

How would you explain kinds?

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

Types just express what you know about a value (which may or may not not be its actual value) without running the program.

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?