Skip to content
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

begin arguments on next line #1113

Closed
aeosynth opened this issue Feb 6, 2011 · 3 comments
Closed

begin arguments on next line #1113

aeosynth opened this issue Feb 6, 2011 · 3 comments
Labels

Comments

@aeosynth
Copy link
Contributor

aeosynth commented Feb 6, 2011

we can write

fn
  foo: bar
### compiles to:
fn({
  foo: bar
});
###

I'd like the same ability for non-objects, ie

fn
  foo
### compiles to:
fn(foo);
###

would this be terribly hard / ambiguous?

@TrevorBurnham
Copy link
Collaborator

Ahhhh, this has actually been a frequent, long-running proposal, though I can't seem to find the most pertinent past issues... #944 is related.

The short answer is: Jeremy doesn't like it; it lets you write very confusing code. Object-passing, in the style you give in your first example, is a special case.

However, if you really want to see this, I'd suggest putting together a detailed, wide-ranging proposal for "How CoffeeScript Should Handle Whitespace." The current behavior is a little bit patchworky, and I'm hoping it'll change in the future, if someone can think it through all the way.

@aeosynth
Copy link
Contributor Author

aeosynth commented Feb 7, 2011

I'll look into it, but don't expect anything. I haven't done more than glance at the source.

@vendethiel
Copy link
Collaborator

Closing since this has been removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants