Pre-SIP: using underscores for type lambdas


#1

Dotty (and probably Scala 2.14) will introduce some syntactic support for type lambdas (the current syntax is described in http://dotty.epfl.ch/docs/reference/type-lambdas.html). Since a term lambda x => foo(x) can be expressed more succinctly as foo(_), it would make sense to have a similar shortcut syntax for type lambdas, but using _ conflicts with wildcard types. https://github.com/lampepfl/dotty/issues/5379 is a proposal to achieve this. Since this involve a rather complicated and potentially painful migration, I encourage you to vote on the github issue, and voice your opinion on the exact details (which version of Scala should understand which syntax ? what should kind-projector do ?). Keep in mind that even if the eventual syntax does not become part of the language until Scala 3.x, you’ll probably already be able to use it long before that using a compiler flag.