For a long time now, I’ve tolerated JavaScript.
There is no denying that JavaScript is here to stay. The browser wars are over and HTML5, CSS, and JavaScript won. This is a fact of life, but I’ve not always been happy about it. Rather, I’ve felt that JavaScript is a great way to make something simple happen when you click something, but that it is not well equipped for large-scale development and trying to use it for complex projects is definitely putting a square peg in a round hole. Yes, yes, I know, jQuery, Underscore.js, Backbone.js, AngularJS, Node.js, blah, blah, blah, blah. The list of JavaScript frameworks goes on an on these days and, yes, some of them do some impressive things. Just because one can do a thing, however, does not necessarily make it a good idea. (Remember self-modifying code, anybody? Hopefully, not.)
My objection to traditional JavaScript is based on the fact that the world has been here before and that strongly typed languages were a response to the pain caused by weakly typed languages. Strongly typed languages permit tooling to be orders of magnitude more intelligent. In addition to the heaven-sent standard fare that is autocomplete, I can instantly view all the methods implemented by a class, search for references across an entire code base, and reliably perform a dozen standard refactorings. Code comprehension is boosted by a host of tools that instantly reveal the secrets of large inheritance hierarchies.
While JavaScript support in IDEs has improved over time, by and large none of the above is available with anything like the scale and reliability of tools built for strongly typed languages (e.g. Java).
Perhaps this is changing …
References