So I suppose I'll have to just say that looking at the article itself and argue the content rather than the packaging. So here's the premise: A bunch of great JS developers aren't also CS developers.
Possibility #1: Correlation == Causation. Writing CoffeeScript rots your brain and makes you unfit for writing great Node.js code.
Possibility #2: Writing great Node.js warps your brain such that CoffeeScript is unpalatable.
Possibility #3: Writing great Node.js code means you're very comfortable with JS itself and your tool chain, and thus you look askance at any switch.
I'd say that both #2 and #3 are far more likely than #1. Neither of them imply that you shouldn't use CS today if it seems appealing.
#4 is most of the point of using most languages. Languages that operate at a higher level 'aka. saving keystrokes' generally do so by offering higher level constructs.
(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.
#4 pretty much the only advantage of CoffeeScript is saving a few keystrokes, not worth spending time on
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.
#5 is probably true for many people. #6 might be true, might not. Amplification of your ideas would be welcome.
#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.
> Or you might be saying that for some developers, including the quoted node developers (and possibly yourself), there are insignificant benefits.
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)
I find that CS introduces very few layers of abstraction in the true sense of the word "abstraction." Even its classes are just syntactic sugar for existing semantics.
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.
https://github.com/raganwald/homoiconic/blob/master/2011/12/...
So I suppose I'll have to just say that looking at the article itself and argue the content rather than the packaging. So here's the premise: A bunch of great JS developers aren't also CS developers.
Possibility #1: Correlation == Causation. Writing CoffeeScript rots your brain and makes you unfit for writing great Node.js code.
Possibility #2: Writing great Node.js warps your brain such that CoffeeScript is unpalatable.
Possibility #3: Writing great Node.js code means you're very comfortable with JS itself and your tool chain, and thus you look askance at any switch.
I'd say that both #2 and #3 are far more likely than #1. Neither of them imply that you shouldn't use CS today if it seems appealing.