2 ms·
Here is another post about coffeescript from the author http://oscargodson.com/posts/writing-eloquent-javascript-without-coffeescript.html http://oscargodson.co
by Detrus 15y ago
Here is another post about coffeescript from the author http://oscargodson.com/posts/writing-eloquent-javascript-without-coffeescript.html http://oscargodson.com/posts/writing-eloquent-javascript-wit... that pretends javascript best practices can be elegant enough that you don't need coffeescript.
Best practices are nice, but it's even nicer when they're enforced by the language so you don't have to see anyone not using them. So you don't have to read books and search for tutorials on how to do basic stuff like inheritance and choose from a zillion library options. Using coffescript you can at least learn the top best practices in one place.
If you're using prototypal inheritance to do the equivalent of classical inheritance, it would be nice to just say what you mean - class and super. The JS language committee seems to hold this viewpoint, say what you mean with keywords, instead of low level blah.prototype, blah.prototype.call(this). The multitude of libraries handling this are inconsistent. If you read Crockford, you might choose the style where everything private is in a closure, you're not using prototype and taking a performance hit. Then if you do need performance, if you have hundreds of instances, Crockford just screwed you and refactoring should make you bitter.
Jeremy's own underscore has _.extend which is the cleanest, but to control the wild west JS out there, the language should enforce one true way.
Nobody wants to know that ugly low level detail of blah.call(this). I can't think of one example of JS code not using the equivalent of classical inheritance. All these arguments against CoffeeScript seem silly when the official language committee is adopting bits and pieces of it where they can. If they could adopt the whole thing, they probably would.
CoffeeScript's real problem is debugging. No one complains much about it, but it would be smoother to see bugs in CS instead of the generated JS.