Currently we have:
Set[_ <: X] // wildcards
type Reader[I, A] = Freer[[T] => Ask[I, T], A] // type lambdas
Looking outside a little we see that:
?_ to be used in place of an lambda argsIt would be nice to make this consistent at the type level like the following:
Set[? <: X] // wildcards
type Reader[I, A] = Freer[Ask[I, _], A] // type lambdas
I agree, it would be great if we could do this. But how to get from here to there? We'd need to
? syntax as an alternate for _. This breaks all programs that use kind-projector._ as wildcard syntax, and add a rewrite rule that maps _ to ?._ as wildcard syntax._ as a placeholder of a type lambda. It seems each step requires a major release, and we cannot compress the schedule. Furthermore, it's difficult even to get started on that path because of the conflicts with kind projector. So I don't think we can take the first step with 2.13.
Or maybe add it under -language:future? It would be also great if kind-projector could cooperate, possibly by using ?? instead of ?.
Ignoring kind-projector for now (mainly just 'cos my brain is nearly off and I need to sleep), could we not just do steps 2-4 in a single major release and provide a rewrite rule? I don't think it's unreasonable amount of change for a major release especially if the migration can be trivially automated.
And if not 2.13 (which I wasn't considering anyway TBH), it wouldn't be a problem to do in Dotty before 1.0 and its backwards-compatibility becomes set, would it?
Duplicate of https://github.com/lampepfl/dotty/issues/2041
gnoring kind-projector for now (mainly just 'cos my brain is nearly off and I need to sleep), could we not just do steps 2-4 in a single major release and provide a rewrite rule? I don't think it's unreasonable amount of change for a major release especially if the migration can be trivially automated.
The problem is cross-building. You can't support new and old versions with the same source then.
Most helpful comment
The problem is cross-building. You can't support new and old versions with the same source then.