| « How to enable Listview Databinding in LayoutTemplate | Lost feeds » |
ECMAScript vs. JavaScript
In my long road to the implementation of a .NET JavaScript interpreter, I discovered that I actually knew little about JavaScript. For instance I discovered JavaScript could do for each loops, had the yield statement as in C#, lambda expressions and even XML instructions.
This is just a subset of what JavaScript defines. But the reason why we neither know nor use those feature is that JavaScript is not ECMAScript. The latest is the standardized version of the first, and they don't follow the same timeline. The one we usually know is ECMAScript 3.0.
As a matter of fact ECMAScript 3.0 (also named ES3) is equivalent to JavaScript 1.5. Those versions are used in Internet Explorer, Safari and Opera. Chrome is compatible with version 1.7 and FireFox 3.0 uses JavaScript 1.8 definition. For cross browser scripts, it's obvious that all developers then use the JavaScript 1.5 (ES3) version.
Next big step is to see all browser implement ECMAScript 4.0, which is supposed to be equivalent to JavaScript 2.0, and embeds all concepts I have enumerated above.
Here is a list of very interesting readings:
New in JavaScript 1.6
New in JavaScript 1.7
New in JavaScript 1.8
John Resig's posts (jQuery's father) about ECMAScript
Update
Bertrand corrected me on ES4. Actually this version will never see the light in standard browsers (instead of FF which already implements it). The reason is that it never went to enough acceptance from other editors (Yahoo and Microsoft for instance), and two different paths were followed. Fortunately they joined back to a more simple evolution of ECMAScript, i.e. ES3.1 later renamed ES 5. This should become standard implementation at the end of this year, thus I can't but follow it also ;). Thank you Bertrand for the information (as usual).