Douglas Crockford wrote in a 2001 article that javascript was the world’s most misunderstood programming language. In another article, from 2008, he explains why: “Its obvious defects, its unfashionable programming model, intentional mispositioning at its introduction, and its ridiculous name caused it to be rejected as unworthy by most knowledgeable programmers”. And then, he recognizes: there was AJAX. And AJAX gave javascript a second chance.
In another place, I read about the phases javascript’s been through since its creation:
- The “We need scripting for web pages” phase. (Netscape)
- The “We should standardize this” phase. (ECMAScript)
- The “Javascript is not a toy” phase. (Ajax)
And now we are in a new phase: Javascript is a programming language phase. And, even though it is currently the world’s most popular programming language, there are still a lot of confusion about its current state, lack of knowledge of its power and outdated information about it. This article tries to throw some light at it.
First, a little bit of history
Javascript was introduced in December 1995 by Netscape. It was developed by Brendan Eich and was called Mocha and LiveScript before. According to Brendan himself, the confusing name was given when Netscape and Sun did a license agreement and wanted to make javascript complementary scripting language to go with Java. Others believe that the name was given so it could ride along in Java marketing, since this was the hot programming language of that time.
In the beginning, the language targeted non-tech people, specially designers and amateurs and the main idea was to add some interation to web pages. That is why the language is so flexible: it was supposed to make programming easy for beginners.
ECMA and standardization
After it was launched, Microsoft, interested in getting some of Netscape’s users for itself , developed a compactible dialect to the language. It was called JScript, as Javascript is a trademark of Sun Microsystems, and was included in Internet Explorer 3. Because of the emerging different implementations, people realized the importance to standardize it.
This job was given to ECMA that wrote a document decribing how the language should work. The language described in this document, the ECMA-262 specification, is called ECMAScript. Other programming languages are based in ECMAScript, like ActionScript.
We are currently in edition 3 (Javascript 1.5 – published in 1999). The forth edition of ECMA-262 (Javascript 2.0) was supposed to be finished in October 2008. Along with the critics it received, the most important were:
- The language didn’t need that much change
- Javascript didn’t need to look like Java or any other language
- Javascript already does well what it proposes to do
- Javascript did not need a better extension mechanism
Because of differences between gigantics – in one side: Google, Mozilla and Adobe (that supported version 4); on the other: Microsoft (that was working in a softer version, 3.1), this edition was suspended and a new mid-term edition was created: ECMAScript Harmony. (more here and here).
Javascript versions and browsers
Javascript is currently in version 1.8.1. That doesn’t mean all browsers run the latest version or even the same one. The table bellow shows each browser and its respective javascript version.
| Version | Release date | Equivalent to | Netscape Navigator |
Mozilla Firefox |
Internet Explorer |
Opera | Safari | Google Chrome |
|---|---|---|---|---|---|---|---|---|
| 1.0 | March 1996 | 2.0 | 3.0 | |||||
| 1.1 | August 1996 | 3.0 | ||||||
| 1.2 | June 1997 | 4.0-4.05 | ||||||
| 1.3 | October 1998 | ECMA-262 1st edition / ECMA-262 2nd edition | 4.06-4.7x | 4.0 | ||||
| 1.4 | Netscape Server |
|||||||
| 1.5 | November 2000 | ECMA-262 3rd edition | 6.0 | 1.0 | 5.5 (JScript 5.5), 6 (JScript 5.6), 7 (JScript 5.7), 8 (JScript 6) |
6.0, 7.0, 8.0, 9.0 |
||
| 1.6 | November 2005 | 1.5 + Array extras + Array and String generics + E4X | 1.5 | 3.0, 3.1 | ||||
| 1.7 | October 2006 | 1.6 + Pythonic generators + Iterators + let | 2.0 | 3.2, 4.0 | 1.0 | |||
| 1.8 | June 2008 | 1.7 + Generator expressions + Expression closures | 3.0 | |||||
| 1.8.1 | 1.8 + Minor Updates | 3.5 | ||||||
| 1.9 | 1.8.1 + ECMAScript 5 Compliance | 4 |
Javascript Engines
Since last year, browsers have been fighting on which one has the best Javascript performance in the so-called Second Browser War. It all began with Google Chrome and its engine, V8. Then, Safari launched its SquirrelFish that evolved 3 months later to SquirrelFish Extreme. In june 2009, Mozilla released its Firefox 3.5 with an optimized SpiderMonkey engine, called now TraceMonkey, that boosted its speed to 40 times in some cases.
Lifehacker did some speed tests last june with the final versions of Safari (4.0), Chrome (2.0) and Internet Explorer (8) and almost-there betas of Firefox (3.5b99) and Opera (10b1). The results can be seen here.
Other Javascript uses and projects
It is worth remembering other uses of javascript, besides in a webpage. First of all, we can use it for:
We can also mention other interesting projects:
- Rhino is an implementation of Javascript 1.7 written in Java by Mozilla. Running on it, you have a lot of Javascript server-side projects
- Javascript on Rails: this is a 2007 project, developed by Steve Yegge, that ports Ruby on Rails to Javascript. Steve did this because he wanted something like RoR to work on projects in Google but this was not an allowed programming language in the enterprise. It also runs on top of Rhino.
- ScreamingMonkey: another Mozilla project, its goal is to allow Tamarin to run within non-Mozilla browsers, starting with Internet Explorer, allowing them to understand Javascript 2 even though not implemented
Related posts:




