> doSomething (-> > 'hello'), 1
The point, I think, is that the example above should be an error instead of compiling into something you wouldn't expect.
Here's a syntax I've seen a lot:
doSomething -> 'hello' , 1
> This is called destructuring assignment,
I think destructuring assignment is something else entirely. http://coffeescript.org/#destructuring
> its probably better to use isnt instead of !=, although rather than !=, you would want !==
'!=' is equivalent to 'isnt'. And '!==' is not CoffeeScript at all.
The point, I think, is that the example above should be an error instead of compiling into something you wouldn't expect.
Here's a syntax I've seen a lot:
or even That style is also handy to construct a long list of object literals.> This is called destructuring assignment,
I think destructuring assignment is something else entirely. http://coffeescript.org/#destructuring
> its probably better to use isnt instead of !=, although rather than !=, you would want !==
'!=' is equivalent to 'isnt'. And '!==' is not CoffeeScript at all.