-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
reserve various useful future keywords #10293
Comments
Another suggestion: |
Yeah, |
It occurs to me that proper language versioning might be the right sol'n here. Java has managed to add keywords with (relatively) little pain, for example. |
Language Version markers is issue #3392 |
+1 for 'where' as a reserved keyword |
Accept that we will decide for 1.0. P-backcompat-lang. |
|
@Jurily |
I did some research looking at other languages' keywords and a list of most common English words for likely candidates. Generally useful parts of speech (like
Things Rust doesn't have at the moment but conceivably could, and/or has in the past, and/or which have come up in discussions:
Exception handling:
Generally useful keywords from other languages which haven't found a home in Rust (and are too long anyways):
Keywords for things Rust has different (better:) solutions, words, and/or syntax for, and is unlikely to ever want, listed only in case someone else thinks differently:
|
I think language versions would be a much better solution than this. It's already getting to the point where very common words are reserved just because. It's annoying enough to need to come up with alternatives to words like |
If we do end up snagging more reserved words (though I agree that proper language versioning would be cleaner), I just wanted to add |
raise |
I'm also concerned about the future need for |
By the way, with respect to |
Nominated. I recall discussing this a couple months ago. Either this should be closed, or it should be on the 1.0 milestone. |
closing; we'll attack each future keyword as it comes up, but just reserving a laundry list is not an idea we want to consider further |
…tion, r=dswij Negate suggestions when needed in `bool_assert_comparison` changelog: none assuming this gets into the same release as rust-lang#10218 Fixes rust-lang#10291 r? `@dswij` Thanks to `@black-puppydog` for spotting it early
I think we should reserve some keywords that we don't have specific uses for but which seem like they would generally be handy:
where
my
our
their
imm
for immutable/immutably/etc (pnkfelix, 2013nov07)Nominating.
cc @pnkfelix
The text was updated successfully, but these errors were encountered: