-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #9829: Allow as
in place of @
for pattern bindings
#9837
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
Conversation
"At-less shrugged." |
I rather like this change. |
@AdamPaynter the issue suggests https://dotty.epfl.ch/docs/reference/contextual/givens.html as a model for the order. I had the same reservation, given usages in other domains. But if I say, "I took you for a bounder," then it's the alias taken as a bounder, the underlying type. Similarly for any definition where the lhs introduces the binding and the rhs the definition. |
I think it can go both ways. ML uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
case p @ Ident(name) if in.token == AT || in.isIdent(nme.as) => | ||
if in.token == AT && sourceVersion.isAtLeast(`3.1`) then | ||
deprecationWarning(s"`@` bindings have been deprecated; use `as` instead", in.offset) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to update the syntax.md
file with the syntax change.
Perhaps, if you believe in punctuated equilibrium
…On Thu, Sep 24, 2020, 7:35 AM som-snytt ***@***.***> wrote:
Worth observing that this change encapsulates in miniature all that is
laudable in the Dotty effort: a judicious willingness to continue to
evolve, when others might have rested.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9837 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYAUAM6ZLLJZFRIPKEAW3SHMVGVANCNFSM4RTXYOMA>
.
|
For 3.0: Can use either
@
oras
.For 3.1:
@
is deprecated.