-
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 literals nest unexpectedly #1577
Comments
+1 |
This is intentional, because it means you can write
instead of
This supports the common idiom of functions taking a single hash as a last argument. (The same thing is done in Ruby, which is part of why its DSLs are so pretty.) Edit: Hmm, ignore what I just said. I'd expect the same output as jed. It's really weird that
compiles to
Maybe @michaelficarra can tell us if there's an existing issue on this... |
#1116 ( and #1564, #1550 ). It's in the |
@geraldalewis: beat me to it. Closing as edit:
Eh, I'm not so sure the discussion has reached agreement. I'll remove it from the milestone. |
thank you, @geraldlewis and @michaelficarra, and sorry for the redundant issue (though it seems like it comes up enough that it might merit some attention). |
@jed totally agree! |
I'd expect
to compile to
but it compiles to
instead. Is there any reason for this?
Having an un-indented element beneath another would indicate that they'd be on the same level, not nested. Thoughts?
The text was updated successfully, but these errors were encountered: