-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Proposal: Allow Single Dollar Sign as Valid Identifier #354
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
Any comments on this proposal? |
This proposal looks in scope for Swift 3 for discussion, but I think it would be helpful if you improved the writing to make it more clear: I think what you're trying to say is that "$[0-9]+" is reserved for closure parameters, that $ by itself should be a valid identifier, and that "$[a-zA-Z_....]" (where the second character is something that would start a valid identifier) should be invalid. |
@lattner as you said. Rewording to make it clear. |
@lattner with PR https://github.com/apple/swift/pull/3901/files already merged. This can be closed. |
I had suggested keeping the Dollar as valid identifier. If my PR is to be closed then it should have been done in June when I requested it and not wait until now by keeping it open. I created this PR in June then someone comes in August and merge their code that changes language syntax breaking a lot of existing code by doing opposite of what I suggested. |
Hi @ankurp, The core team discussed this today and would like to run this proposal for review by the swift-evolution community. Three requests:
Thanks! |
Thanks will update soon. |
bf757e8
to
8aa5803
Compare
Updated the proposal to be more clear. Looking forward to whatever the community decides. |
Thanks! I'll merge this, make a few tweaks, and kick off review. |
Swift should continue supporting use of
$
as an identifier but when used with non-numeric name consider it an error.→ View Proposal