Skip to content
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

Use * as a placeholder in addition to ?. #91

Merged
merged 1 commit into from
Feb 22, 2019

Conversation

TomasMikula
Copy link
Collaborator

@TomasMikula TomasMikula commented Feb 21, 2019

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 #84.

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.
@non
Copy link
Contributor

non commented Feb 22, 2019

Seems like a reasonable idea. 👍

(If we think of a better symbol than * we can go ahead and change it before the next release.)

@non non merged commit 3fcc41b into typelevel:master Feb 22, 2019
@jeremyrsmith
Copy link

Can there be a way to disable this? I'm actually using * as a type name, and I get a nice little compiler crash from kind-projector as a result.

milessabin added a commit to milessabin/kind-projector that referenced this pull request Jul 3, 2019
The plan for Dotty is to repurpose `?` for wildcards instead of `_`.
In typelevel#91 `*` was added to kind-projecter as alternative placeshold syntax
to `?`, and Dotty now also supports `*` as placeholder syntax for cross
compilation via `-Ykind-projector`.

This PR updates the documentation and examples to use `*` rather than
`?` and adds a warning that the `?` syntax will be deprecated in future.
sirocchj pushed a commit to sirocchj/kind-projector that referenced this pull request Oct 3, 2019
The plan for Dotty is to repurpose `?` for wildcards instead of `_`.
In typelevel#91 `*` was added to kind-projecter as alternative placeshold syntax
to `?`, and Dotty now also supports `*` as placeholder syntax for cross
compilation via `-Ykind-projector`.

This PR updates the documentation and examples to use `*` rather than
`?` and adds a warning that the `?` syntax will be deprecated in future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change ? to another symbol
4 participants