3 ms·
I actually prefer this feature to JavaScript. Coffee forces the developer to use parentheses in a meaningful way. Many developers are using outer parentheses
by doublerebel 14y ago
I actually prefer this feature to JavaScript. Coffee forces the developer to use parentheses in a meaningful way. Many developers are using outer parentheses in Coffee, similar to Haskell, and I think that provides more clarity.
Realistically in CoffeeScript these versions of the article's examples are far more common, and much less ambiguous:
doSomething = -> true
doSomething -> false or: doSomething (-> false), otherarg
doSomething()(-> false)
I feel that extreme flexibility of JS spacing leads to much more ambiguity. Syntax highlighting is in every modern IDE and I never find myself confused. A programmer can write ambiguous code in any language.
I think the amount of controversy over CoffeeScript's syntax is a indicator of its level of innovation.