That's why I'm a big proponent of a new browser language (be it Dart or something). JavaScript was made for constructs like onclick="this.className=(!this.className || 'clicked')". The fact that we are using it for applications now doesn't make it a good language by design, and "just use that instead of this" is a poor defense for fundamental flaws. And I'm not only talking about true vs truthy. Scope, context and this also comes to mind.
I read a lot about how fundamentally flawed JavaScript is on blogs and Reddit, but I never -- not rarely, never -- have problems caused by any of them despite using the language every day.
JavaScript is a flawed language, and beginner programmers can make some mistakes in it that aren't possible elsewhere, but in practice it doesn't matter and none of my problems can ever be blamed on JavaScript.
8
u/Poltras Mar 26 '14
I would say that promoting bad behavior is the problem with JavaScript. Why have == at all?