(a) -> (b) -> (c) -> ((x) -> (y) -> (z)) is readable and understandable in coffee script the same is not true for javascript, but it's just a 'few extra keystrokes' to do the same thing in Javascript.
Same thing in mathematics, it's just a few extra keystrokes to express 2 ^ 3 ^ 4 ^ 6 ^ 7 in basic addition, same thing with calculus and algebra.
The point is valid in the trivial case but as soon as you start looking at saving a few keystrokes as a 'expressive power' then it makes a lot of sense to use a language like coffeescript.
Once you start using the expressive power of a higher order language, it's an order of magnitude more keystrokes in the less expressive language.
Well, I suppose you could also say that the reason I might use Ruby over Java is to "save a few keystrokes". I'm exaggerating to make the point that shortcuts for common tasks are important.
- String interpolation (`"foo#{bar}baz"`)
- Existence unary operator (`foo?`, `foo ? "bar"`)
- Splats (`(foo, bar...) ->`)
- Comparison chaining (`10 < foo < 20`)
- Loops and comprehensions (`x() for x in ["foo", "bar"]`)
- Destructuring (`[foo, bar] = items`)
- Ranges (`num for num in [1..10]`)
- Array slicing (`items[3..5]`)
- Object properties (`for own key, value of object`)
I think these are all substantive improvements to JavaScript, not even taking into account readability-improving sugar like post-conditions.
#4 needs some clarification. If you're making a global statement, then you're contradicting my experience and the statements of many CS users. Agree or disagree, clearly it's "debatable" and not axiomatic accepted fact.
Or you might be saying that for some developers, including the quoted node developers (and possibly yourself), there are insignificant benefits. I listed the possibility that the node developers saw no significant return on investment, so if that's what you're saying, then we agree.
Exactly, I read your comment in this style (which seems to have been correct according to what follows my quote) and decided to use the same. These were not intended to be understood as the absolute truth brought down from the mountain.
Although some of these points do roughly match my thinking (if I'm going to learn a not-JS-but-compiles-to-it, I'd rather use something drastically different which can bring significant gains — e.g. Roy or ClojureScript — or build -my-own via SweetJS than limited syntactic sugar)
My (mild) knock against it is that it doesn't introduce any new abstractions. No special sauce for continuations or promises, for example. But that is obviously a two-edged sword, it eschews new semantics by design.
#4 pretty much the only advantage of CoffeeScript is saving a few keystrokes, not worth spending time on
#5 most of your day is still spent reading javascript, the mental overhead of switching between JS and CS all the time makes it unappealing
#6 using javascript makes for writing better javascript libraries than coffeescript