-
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
object literal #1111
Comments
Reducing to:
|
you can reduce it a bit further:
|
So to review and bring in #1143:
is fine (yielding
all give the same bizarre error message described above. So there's a special case being made for Note that all of the above work fine with explicit curly braces. |
Honestly, it seems like a feature to me if the first line doesn't compile, because it means you'll be forced to use parens to indicate your intended structure, and I won't have to guess at the intent when I read it. |
@MichaelBlume: Which first line? I don't see any ambiguous syntax anywhere in this issue. |
"Guess the intent" was a poor choice of words on my part. If I think about it for a moment, I can see that the code must mean one and only one thing. "If I think about it" is the problem here. Code should be as transparent in meaning as possible. Up to a point, excessive punctuation occludes meaning, but in this case, a well-placed pair of parens would be more readable. |
I found another case:
the
edit: second case |
@aeosynth: Maybe the |
I've posted a bug bounty for this. |
Rewriter bugs are particulary tough--$10 seems rip-off. |
Agreed with @satyr, but it's still better than no reward and we can still have more than one person contribute a bounty. |
The problem lies in that solving this problem is left to the |
PARSE ERROR ON LINE 2: UNEXPECTED ','
OK
OK too
Best regards,
--Vladimir
The text was updated successfully, but these errors were encountered: