-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change ? to another symbol #84
Comments
Thank you for letting us know! I think the proposed syntax ( The question for kind projector is, what symbol do we use (alongside In math,
The problem is that the en-dash is not a valid Scala identifier. Also, it is not easily typed on a keyboard. So I suggest to use |
How about using a star I think something like |
👍 to
Agreed on both the pain it will take to translate, and the fact that it's worth it, btw. |
Let's rename to /s |
Motivation: There is a proposal for F[?] to denote a wildcard (currently F[_]) in Scala 3.0+ and F[_] to be a shorthand syntax for type lambda (F[?] with current kind-projector syntax) in Scala 3.3+ (see scala/scala3#5379). Supporting an additional placeholder will allow users to gradually move from `?` to `*` before Scala 3.0 is out. Resolves typelevel#84.
See #91 where I went with |
It seems like Dotty will get native type lambdas. The plan there is to use
F[_]
as a short-hand syntax for the type lambda[X] => F[X]
andF[?]
to be the wildcard syntax which unfortunately is different to how the?
is used in kind-projector.In scala/scala3#5379 there's a discussion of doing the swap incrementally in Scala 3.0 - 3.3, but imo that would lead to unnecessary churn and confusion, so I was wondering if kind-projector could preemptively replace the
?
by another symbol so that until Dotty is out the?
is free to use for wildcards.Maintainers' opinions are welcome here or in the above ticket 😃
The text was updated successfully, but these errors were encountered: