Hacker News new | ask | show | jobs
by etanol 5061 days ago
Just like with C++. That language is a horrible mostruosity, yet projects keep migrating to it, e.g., Id's game engines, GCC, etc.
2 comments

Things can be horrible in many different ways. C++ is definitely horrible in some ways, but when used properly, it allows you to do stuff you cannot do with most 'less horrible' languages (if any). Going C++ is a very valid tradeoff for many purposes, the only reason people are looking down on it now is because the spec is a little messy, and because it is probably one of the most difficult programming languages to really master.

JavaScript on the other hand really is horrible in every way imaginable except ubiquity. Personally, I think it's a really bad thing people are trying so hard to point out 'the good parts' of JavaScript, because it devalues all those other great languages that share the same 'good parts' without the rest of the lunacy that is JavaScript. I'm thinking about languages such as Lua, Go, Erlang, Clojure, etc.

There really is only a single excuse for using JavaScript, which is when you are writing web applications, and only because it's (sadly) the only option you have if that's your game. JavaScript is like the QWERTY keyboard layout, back in the day it was designed it was ok for the purpose, and now we're stuck with it because everyone standardized on it.

Projects keep migrating/being built in it because it offers things other languages don't (for example being relatively close to the metal while still being Object Oriented) and it's available.

On the other side you have web people who hate javascript or would like a solution more suited to their needs and can barely do anything about it since it's the only browser language. I find C++ just as messy as anyone else but its context is so different from javascript's that it doesn't even make sense to compare them.