News for hackers. Stuff that matters.
Re:CoffeeScript: less typing, bad readability by aes on Tuesday September 18, 2012 @01:51AM (#4536561)

  > doSomething (->
  > 'hello'), 1
> Indentation is significant in CoffeeScript, just like it is in Python. Just having a parenthesis shouldn't change that.

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
or even

  doSomething ->
      'hello'
  ,
      1
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.

There are no comments on this comment yet.