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."
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: