
"AnyKind is defined as the supertype of all types, regardless of their kind. This means you can pass any type, including plain types, higher-kinded types, and type lambdas."
"A <: AnyKind tells us one thing: this is some type. It doesn't inform us whether it's a normal type, a unary constructor, or a type lambda, leaving the compiler unable to perform meaningful operations."
"AnyKind doesn't give you power. It gives you access. The key mental shift is understanding that AnyKind is orthogonal to Any, not an enhancement."
AnyKind is a new type in Scala 3 that serves as a supertype for all types, including constructors and higher-kinded types. It accepts any shape of type, providing a powerful abstraction. However, it does not specify the kind of type, which limits its usability. The compiler cannot determine how to handle a type defined as A <: AnyKind, leading to potential errors. AnyKind offers access to types but does not inherently provide additional power or functionality beyond what Any offers.
Read at Medium
Unable to calculate read time
Collection
[
|
...
]