> None of these things are "language features" that compile from a language that has them—CoffeeScript—into a language that doesn't have them—JavaScript.
This is inane. Haskell used to compile to C. Were they not "language features"?
Haskell wasn't simply sugaring the regular C design patterns. The C that the compiler generated was nothing like the C that you would normally write.
A better example would be Objective C compiling to C. And I would agree that early Objective C wasn't really a language that added new paradigms to C. It sugared good coding practices for the most part, and did little else. As a result, I generally recommended a combination of the K&R book and the ObjC language spec to learn it -- buying books for ObjC was a waste of time, since it was such a thin wrapper around C.
Clearly my writing is obtuse. Haskell has a language features—lazy evaluation for example—with no equivalent in C. Nothing about lazy evaluation compiles more-or-less 1:1 into C code, it’s a program-wide transformation.
CoffeeScript’s features are all JavaScript features, it’s a simple translation from some shorthand into some other shorthand. CoffeeScript is like the LET macro in ur-Scheme. Powerful, handy, but not a new paradigm, more like some syntactic meta-programming on top of JavaScript’s existing model of programs.
> CoffeeScript’s features are all JavaScript features,
> it’s a simple translation from some shorthand into
> some other shorthand.
This isn't entirely accurate -- in the sense that current CoffeeScript semantics can't be implemented as a series of "find-and-replace" operations into JavaScript. Some of the areas in which the AST transformations become more involved are:
* Converting arbitrary statements into expressions.
* Destructuring assignment, when mixed with splats and soaks.
So there are more advanced macros that are being used. It's not doing much a lisp couldn't do. I mean, look at scribble. It's still racket, even though it has not an s-exp in sight.
Chains of soaked invocations are just a Maybe Monad anyways. It's nothing too out there. You could write them in normal javascript fine.
Coffeescript doesn't even have its own standard library, much less a runtime being cross-compiled with its own garbage collector and stack frame constructs.
This is inane. Haskell used to compile to C. Were they not "language features"?