News for hackers. Stuff that matters.
Re:CoffeeScript: less typing, bad readability by jaysoo on Monday September 17, 2012 @02:25PM (#4534025)
I myself enjoy using CoffeeScript, but I understand it might not be for everyone.

It's always good to look at the pro/cons before choosing a language, so I think discussions like this is good.

That being said, some of the problems this article points out can be addressed by going back to more JS style.

e.g. Not relying on implicit parentheses/commas/braces

I like the "Fancy" for loop because it's closer to what I do in Python (yes I know they are not exactly the same). Same thing with the "Tricky" if statements.

Also the redefinition shortcuts provided in CoffeeScript is pretty much what I do in plain JS anyway.

e.g.

JS: foo = foo || 'bar';

CS:

  foo or= 'bar'
Re:CoffeeScript: less typing, bad readability by pistoriusp on Monday September 17, 2012 @02:34PM (#4534085)
CS 1.3.1:

"Conditional assignment of previously undefined variables a or= b is now considered a syntax error."

Re:CoffeeScript: less typing, bad readability by jaysoo on Monday September 17, 2012 @04:21PM (#4534661)
Yeah I know. It was just a quick example.

It's useful for something like:

  f = (options) ->
    options.foo or= 'bar'
    # ...