JavaScript The Language With Two Names
Written by Ian Elliot   
Thursday, 26 March 2015

You have to feel sorry for JavaScript it doesn't even have a name to call itself by. Why is JavaScript such a fragmented entity and does it matter? With ECMAScript 2015 about to be announced as a final standard, now is a good time to consider the names of the web's favorite language.

 

JSlogo

 

You probably already know the brief history of JavaScript. It was a rush job. Brendan Eich was asked to produce a scripting language for Netscape.

It was a twist of Internet fate that Eich was not one of the Java or C++ is the way to go people and so he invented something different - a language that was functional and object-oriented where functions were first class objects and objects were associative arrays or hashes depending on your terminology. This made his language different and misunderstood, a status it retains to this very day.

The first name used to describe it was Mocha, but it officially saw the light of day as LiveScript. Then when it made it into Navigator 2.0 it changed its name to JavaScript, forcing countless FAQs explaining that JavaScript has nothing to do with Java. The reason it was named JavaScript was simply to cash in on the popularity of the new and vibrant language that was Sun's Java. 

JavaScript was copied a number of times. There was Microsoft's JScript and Adobe's ActionScript, for example. Close enough to the original to be recognizable, but not close enough to run each other's programs. 

In 1996, soon after JavaScript was released, Netscape submitted JavaScript to ECMA International to be turned into an industry standard. This resulted in ECMA-262 in 1997. The most surprising thing about this standard from the point of view of outsiders was that the language it referred to was called ECMAScript. The reason usually given is that Microsoft and Netscape couldn't agree on the name to be used and ECMAScript was the middle ground they could agree on. It might also have something to do with another big surprise, the fact that JavaScript is a trademark of Oracle and only used under license by NetScape and today by Mozilla et al. Let us hope that Oracle doesn't wake up and insist we all pay a licence fee for calling ECMAScript "JavaScript".

Whatever the reason, you have to agree with Brendan Eich:

"ECMAScript was always an unwanted trade name that  sounds like a skin disease."

Who wants to call their favorite language "ECMAScript"?  And so JavaScript is the name most used and .js rather than .es is the common suffix. 

You might at this point think that this is all slightly amusing and not in the least important, but what then is the latest version of JavaScript called?

Since the first standard there have been five editions of ECMAScript, but note that the fourth never saw the light of day and the sixth is almost ready to be published.  During the same period JavaScript went from 1.1. to 1.8.5, according to Mozilla, at least with a very complicated mapping to ECMAScript compliance. For example, version 1.3 was broadly compatible with ECMAScript's 1st and 2nd editions, 1.5 was compatible with ECMAScript 3rd edition and version 1.8.5 is broadly compatible with edition 5.

In fact, because the names of the standard and the language don't actually agree, there often hasn't been the pressure for JavaScript 1.x to fully implement any particular ECMAScript edition. When you look beyond Mozilla, the pattern of what is and what isn't implemented is even more difficult to figure out.

I do think that the name split makes this lax compliance possible. Imagine, for example, if a  C++14 compiler didn't actually implement the C++14 standard. There would be a lot of complaint and criticism. But when JavaScript 1.4 doesn't quite implement any ECMAScript standard a natural response is to say:

"well why should it? It's JavaScript and that's ECMAScript". 

Today things are better in that the JavaScript implementers do seem to aim to be compliant with the latest version of ECMAScript, but there is still a feeling that JavaScript really isn't quite ECMAScript and so some freedom and flexibility is OK. It is as if ECMAScript was some sort of target to aim for, but JavaScript is different and so therefore it doesn't really matter if its missed by a few miles. 

If you don't believe me consider what the average programmer's reaction to anybody who released a language called ECMAScript 6, or whatever the latest version was. Do you think they would be asking - does this language conform to ECMAScript 6? Now consider the same situation with a language called JavaScript 2, say. There is a psychological difference caused by the name and version change. 

This discrepancy is very real. Just go and check any compatibility chart for implementation of the latest JavaScript and the latest ECMAScript - it is a mess that we have to navigate through every time we write a program. 

With the latest version of ECMAScript you might think that there is a chance for putting things right - but no, things are getting worse.

Until a few months ago it looked as if ECMAScript 6, or ES6, would be released and JavaScript could move towards a new version - presumably JavaScript 2.0 or perhaps JavaScript 6 to get the version numbers aligned.

What has now happened is that the ECMAScript community has decided to switch to year numbering. So it isn't going to be ES6, but ES 2015. 

 

ecma

 

You can see that this is good in the sense that it dates the standard and perhaps allows a faster update. However, everyone who has managed to understand that the next JavaScript is targeting ES6, even if it isn't there yet, now has to rethink and get used to ES 2015. Consider all the articles that talk about ES not to mention the book covers and even websites with ES6 in the title.

Ah well. these things do not concern the JavaScript programmer - we just want to know what the spec is that a language conforms to. 

But the simple fact is that there is no spec for JavaScript.

The JavaScript engine implementers are simply chasing some mix of the different ECMAScript standards. And this is very largely because of the stupid naming problem.

What other language conforms to a standard of a language with a different name?

OK, I'm sure you could find me one, but you get the point.

This also causes a split in the JavaScript community. 

Tell me where the center of the JavaScript world is? 

What corresponds to www.python.org, www.ruby-lang.org, php.net, golang.org or even isocpp.org?

The best we have is MDN, which covers just one dialect of the language that isn't quite ECMAScript. 

We don't even have an official JavaScript logo. The best we have is an unofficial logo introduced at JSConf 2011:

 

JSlogo

 

What is the solution?

The solution would be for ECMA to issue ECMAScript 2015 as JavaScript 2 and then any language implementer who claimed that its engine supported JavaScript 2 would be making a clear and verifiable claim. 

This isn't going to happen.

More Information

ECMAScript 2015 Release Candidate 3 

Related Articles

JavaScript Is Basic's Offspring

WAT! JavaScript, Ignorance And Prejudice

JavaScript Inherits The Earth

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


JavaScript Jems - Objects Are Anonymous Singletons

JavaScript should not be judged as if it was a poor version of the other popular languages - it isn't a Java or a C++ clone. It does things its own way.  In particular, every object can be regard [ ... ]



JavaScript Canvas - Typed Arrays

Working with lower level data is very much part of graphics. This extract from Ian Elliot's book on JavaScript Graphics looks at how to use typed arrays to access graphic data.


Other Articles

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Thursday, 26 March 2015 )