-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
for syntax without a variable #2675
Comments
Looks easy to read +1
|
I like this. |
cc: @nanosec – if you're bored and looking for something to hack on since you know your way around the parser code pretty well after doing the 128-bit integer and bigint thing. |
This works with both
|
That seems ok but maybe not fully general. I guess to be conservative, we can only allow literal ranges for this. |
For a statement like @repeat 10 f() Implementation of such a macro should be trivial. |
I'm a little skeptical of this; I prefer to err on the side of conservatism when it comes to adding new syntax, and there doesn't seem to be a pressing need for this … it just saves you from typing two characters ( |
+1 This is a very nice syntatic sugar, and make some |
I think the |
Seems this is likely not to happen. Also, |
Especially with comprehensions I do this by accident fairly often:
We could support the same for loops:
Not super crucial, but seems like something we might as well allow.
The text was updated successfully, but these errors were encountered: