For some language X where Y “compiles to “ X, Y is a new language if it introduces new semantics. For example, pure functional semantics, or object-orientation, or pattern matching, or method flavours, or static typing.
One easy test for this is to ask whether compiling Y to X can be done in small chunks or whether it requires “Whole program rewriting.” For example, transforming a program with continuations into CPS requires whole-program rewriting. I would call any language that adds continuations to JavaScript a new language on that basis alone.
CoffeeScript is almost entirely local transformations. I think of it as JavaScript.
• a classical object model, complete with super()
• forced strict equality
• loop-local index variables (gets around the setTimeout(function() {console.log(i)}, 100) problem)
• all variables local unless explicitly declared otherwise
• CoffeeScript's splat arrays are totally different from JavaScript's arguments object
• list comprehensions (whether this is a semantic or syntactic change is debatable, I suppose, but the same could be said for basic OO)
• everything is an expression
The last one is a biggie that completely changes the meaning of many seemingly identical blocks of code. If that isn't a semantic change, what is?
Javascript has a distinction between statements and expressions, while to my knowledge CoffeeScript does not. "Everything is an expression" is a huge difference in semantics even though nothing has been added.
Are they the same language?
Edit: It does add features like pattern matching and list comprehension, and anything can compile down to js, so I guess it is a separate language.
Another aspect in which CS differs from JS is that it provides built-in classes; which i think can make code written in CS much more consistent compared to JS, where everyone seems to like inventing their own way of writing classes.
And i'm sure i'm forgetting other aspects in which CS differs from JS that i wouldn't consider "just syntactic".
Let me put it another way. If I were to write a separate runtime that directly executed CoffeeScript (without JS as an intermediate step), would you then be satisfied that it is in fact a real language?
http://wiki.ecmascript.org/doku.php?id=harmony:destructuring