|
Well, that's just unnecessarily offensive. I'm proficient in Python, Java, and C, and was at some point also fluent in PHP, Ruby, and Lisp. While I wouldn't particularly enjoy coding in Javascript, CoffeeScript is, to date, the best language I've worked with. I debug in JavaScript, so I'm not that far away from it. Why is "class-based OO" necessary? There's nothing wrong with prototypal inheritance. The way modules are done in Node is pretty powerful compared to other languages I've used. The scoping rules are different, for sure, but I don't really see why you'd call them "broken". They're internally consistent and easily comprehensible. Semicolon insertion is, admittedly a problem. The solution, of course, is to put in your own semicolons. If you do that, and use something approaching reasonable whitespace conventions, there isn't really a problem. JavaScript's `==` the like are, for sure, broken, but that's nothing a `===` can't fix. It's not like the other languages you mentioned wouldn't have issues without reasonable conventions. |
I find your arguments somewhat odd. You do openly admit that you "wouldn't particularly enjoy coding in Javascript". People don't say such things about good programming languages, especially when arguing in favor of them to some extent.
I also find it odd that you argue that there's nothing wrong with prototype-based OO, yet claim that CoffeeScript is the best language you've worked with. One of CoffeeScript's most useful and important features is that it adds very simplistic class-based OO to JavaScript. Go look at the example code in the "Classes, Inheritance, and Super" section of the CoffeeScript home page to see what I'm talking about. The CoffeeScript code is tolerable; the JavaScript that's outputted is horrendous. Hand-written JavaScript is often just as bad, if not worse.
The various JavaScript "module" systems are purely hacks. They abuse existing language features to fake modularity, poorly. They're nothing like the proper module support of other languages. And at least you admit that semicolon insertion and the broken comparison operators are serious issues. Many other JavaScript advocates refuse to, for whatever reason.
There's nothing wrong with admitting that JavaScript is a really bad language. I think you know that it is, and want to admit it, and I think you should. It doesn't deserve to be defended, because its problems are generally inexcusable in every respect.