I, unfortunately and unwittingly, started a minor Twitter flame war earlier today. Of course, there is only one way that could turn out.
The subject was on the importance of JavaScript. The original tweet was:
“By 2017, JavaScript will be the most in-demand language skill in application development (AD).”
— Forrester Research 2014
I will leave out who provided the tweet. Yes, I will forward them a link to my article. If they post a reply, I will update this post with a link.
Before I begin, let me say a few things. First, I did not read the referenced article. This is because a) I couldn't find it, and b) every report on Forrester's site seems to cost 499USD. Second, I do actually like JavaScript and have been using it for a VERY long time. Finally, as longtime readers will know, I am a proponent of learning your language, not your extension framework.
My response to the comment was "if this comes true, we have failed our customers and users..." This spawned an epic, 3 hour conversation thread that I'm not going to fully recount. I will make sure all of their points are addressed.
My response was fueled by two primary things. The first was a couple "interactions" I've had with Douglas Crockford. The most important of these was the DevLink 2012 closing panel. During this panel, Crockford replied to a question about the longevity of JavaScript with the following response:
God, I hope not. If it turns out that JavaScript is the last programming language, that would be really sad. But unfortunately, because of its dominance in the web, it is now moving into virtually every place else. It has become a tragically important language, and we’re going to be stuck with it for a time...
This has, and still does, mirror my feelings. This took place at about the same time WinJS was starting to come into fashion. At that time, I had some informal numbers telling me that WinJS was not as prevalent as Microsoft was letting on. Unfortunately, I do not have current numbers as Microsoft doesn't publish this type of information.
That leads to my second point. I do NOT like the fact that the quote says "application development." Yes, web apps are apps. However, I am afraid that is not the intent of the statement. I fear that this statement is referring to JavaScript as a golden hammer. There are cases where JavaScript is the right tool for the job. However, JavaScript is not the only tool for the job.
I think back to the early 2000s. Perl was ALL the rage. It was used for everything, including webpages. The problem was that Perl was originally written for a specific purpose. It was written to be a VERY efficient string parser to enable Linux admins automate command line tasks that involved scrubbing log files. To this day, it still's still widely in use doing just that.
Soon, however, people said "PERL ALL THE THINGS!" We began to see webpages that were Perl scripts constructing a page in real-time. We began to see command-line apps that were Perl scripts that just automated calls to other command-line apps.
In the long run, Perl had this dirty little secret. It was made to be very easy to use, to be marginally forgiving, and to offer great flexibility. Larry Wall, the father of Perl, described a good programmer as being lazy. In the end, this led to bad habits, unmaintainable code bases, and large amounts of effort (and money) being spent to go back and do it right.
If, when reading that last paragraph, you didn't mentally swap Perl for JavaScript, go back and try again.
During all this talk, people professed the joy of all things JavaScript and how I was categorically WRONG. The biggest, recurring theme was "but what about node.js". Let me sum this up in 3 parts. First, it says .js. Thus, it's just JavaScript on the client. Second, the server side is a WHOLE bunch of C++. Third, It's not like it has a dependency to openssl or anything... (Too soon?)
As a bonus fourth, this argument would have been about Ember last year. Knockout the year before that. jQuery the year before that... If my timeline is wrong on the previous next-big-things, that's because I never used any of them. I wrote JavaScript, using the as is was defined in the ECMAScript spec. Interacting with the DOM in a method that was outlined in the DOM spec. Writing carefully engineered client code to do only want I needed without fragile, outside dependencies.
Guess what, that code had generally worked on all browsers, of all types, without side effects. I say generally because you do have to add CSS into the mix, and no browser universally uses it correctly.
Given all that, I would never dream of writing an application in JavaScript. I consider it a tool that I can exploit in the correct circumstances. People say, “but, it’s ubiquitous. Why not use it?” Of course, their bosses said that two decades ago about Java.
Technology changes faster than we realize. I can’t tell you want language I will be using in 3 years. I can’t tell you want languages will still be around. People still make a fortune maintaining COBOL. What I can tell you is that technology is run by neither merit nor artistry. There is a little of both, but something else. Once the true engineers get a hold of JavaScript and make people do it right, the lemming will find the next easiest path.
My only hope is that this happens sooner, rather than later.