I think that kind-polymorphism in Scala 3 has huge potential for libraries, but like most "higher" concepts, we introduce higher kinds only so we can eliminate them later. If Scala 3 supported functional dependencies between kinded types, we could gain a lot.
-
-
Here's how that might look. Imagine we want to define an interface common to `Show` and `Functor`. def apply[F[T] <: AnyKind, S <: T.kind]: F[S] = ... apply[Show, String] apply[Functor, Show] apply[Functor, String] // error
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.