JavaScript has always had a gorgeous object model hidden within Java-esque syntax. CoffeeScript is an attempt to expose the good parts of JavaScript through syntax that favors expressions over statements, cuts down on punctuation noise, and provides pretty function literals. This CoffeeScript:
square: x => x * x.
Compiles into this JavaScript:
var square = function(x) {
return x * x;
};
If anyone has specific ideas about aspects of JavaScript that they think could be more convenient or better-looking, I'd love to hear them. Cheers.
Quite right, and internally, both kinds of assignment compile into a CoffeeScript AssignNode. The latter is just tagged as occurring within an object literal. Having the commas be optional in multiline objects also helps make both kinds of assignment look identical.
(And I'm calling it assignment because saying "binding" in JavaScript usually means that you're binding a function to a "this" context object)