Multiple type parameter lists in Dotty? (SI-4719)

Perhaps if there were something like _ (like in list.reduce(_ + _)), but for types, that we could use to define type lambdas with anonymous parameters, this would be more feasible.

Those who need V be inferred are happy, but those two need K be inferred would need to define something like

type M[V][K] = Map[K, V]

That could be turned into just Map[$][V] where $ behaves something like _ and turns it into [K] =>> Map[K][V], making it similar to Map[K]

Edit: There’s a Pre-SIP for this already: Pre-SIP: using underscores for type lambdas

1 Like