Scala 3 is an impredicative language, it is generally impossible to assign higher kind to normal type (at the risk of triggering Girard's paradox), but in reality, some type assignment appears to be able to bypass this rule:
trait Vec[T]
type VV1 = Vec // paradox!
type VV2 = [T] =>> Vec[T] // no paradox?
What are the differences between the last 2 lines? Why is the second one possible?
The second line is possible because language authors decided that type alias can contain type constructor for consistency. If
List
is a type despite not being a proper type, so can be a type alias if we want to be consistent. And if functions can be curried, partially applied or passed over, so can be types.Second line is equal to third line:
See specification for more details.