-
Notifications
You must be signed in to change notification settings - Fork 2k
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
implicit array suggestion #1190
Comments
There are some glaring ambiguities here. Do you mind writing up a grammar or something to better illustrate your suggestion? |
What's the benefit? Just saving two characters? (and not even in the OTOH, cleaner dereferencing assignment would be a slightly bigger advantage. You could do e.g.: |
Too many ambiguities for this one, I'm afraid.
|
a (1, 2, 3) # definitely 1 arg: array. |
Commas are reserved for function arguments and array elements. However, if there's no function, is there any harm in interpreting an expression like "3, 4, 5" as an array? Would it be useful?
examples off the top of my head:
x = 3, f(2, 3), 5
x: 3, 4, 5
(3, 4, 5).slice 0
x for x in 3, 4, 5
And there's no reason it shouldn't work like function arguments, where only the first comma is mandatory:
x,
f 3
z
Thoughts?
The text was updated successfully, but these errors were encountered: