132
edits
No edit summary |
|||
Line 42: | Line 42: | ||
The Tamarin project is another open-source ES4 implementation, which is being developed chiefly by Mozilla and Adobe for use in future Firefox and Flash Player products. There may be other ES4 implementations underway internal to different organizations, as well. | The Tamarin project is another open-source ES4 implementation, which is being developed chiefly by Mozilla and Adobe for use in future Firefox and Flash Player products. There may be other ES4 implementations underway internal to different organizations, as well. | ||
== When can I realistically start using ECMAScript 4? == | |||
It depends within which context. If you are most concerned with doing web development using ECMAScript 4 (and, thusly, JavaScript 2) then the short answer is: Probably sometime in 2009. | |||
There's multiple aspects to this response and it can be broken down as such: | |||
Mozilla is working hard to create a full implementation of JavaScript 2. This will be created using Tamarin and integrated into the Mozilla platform via ActionMonkey. This is part of the large Mozilla 2 rewrite and will be introduced, to the general public, in Firefox 4 (which will, most likely, be released in 2009). Right now, however, you can begin using some JavaScript 2 features in the current release of Firefox (Firefox 1.5 has JavaScript 1.6, 2.0 has 1.7, and 3.0 has 1.8). | |||
Opera has already begun some implementation of features in the upcoming Opera 9.5 browser. It is expected that they will have a large portion of ECMAScript 4 implemented by 2008-2009. | |||
Apple has not outlined any specific plans for implementing ECMAScript 4 in Safari (in KJS). However, they have recently joined the ECMAScript group and are tracking the development of the language. | |||
Adobe has been making significant headway towards building a full ECMAScript 4 implementation. Currently, ActionScript 3 implements a large portion of the ECMAScript 4 specification. However, for ActionScript 4 they are looking to move to a full ECMAScript 4 implementation. Adobe is working with Mozilla to build up the Tamarin virtual machine - which should be embedded in Adobe Flash 10. | |||
Microsoft has not announced any specific plans about implementing ECMAScript 4 in Internet Explorer. However, their implementation of JScript.NET 8 already has some ECMAScript 4 features in it. It isn't clear, though, if they will be working to bring JScript.NET in line with the full specification. | |||
All of that being said, there's an important development taking place: ScreamingMonkey. ScreamingMonkey is a Mozilla project that is attempting to integrate the Tamarin engine into Internet Explorer, allowing users to develop JavaScript 2-compatible applications that'll work in all browsers. To complete the picture, it is expected that Adobe will help to distribute ScreamingMonkey with the Flash runtime - providing browser-based JavaScript 2 support to all users that have Flash installed. | |||
== How can I try ECMAScript 4? == | |||
The ECMAScript working group (ECMA TG1) is providing a reference implementation that you can play with in order to get a feel for how the language operates. A binary version currently exists for OS X. This [http://www.ecmascript.org/download.php download] will give you a console application that you can run to try the syntax out for yourself. | |||
You can use the binary reference implementation like so (on OSX and Linux): | |||
<pre>$ ./es4 | |||
>> var test = "works!"; | |||
>> var test2: int = 5; | |||
>> class User { var name; } | |||
>> var u = new User(); | |||
>> u | |||
[object User] | |||
>> u.name = "John"; | |||
John</pre> | |||
The reference implementation was created for ECMAScript 4 implementors to use as a base of comparison for their development. Thus, it's implemented using SML (a language well suited to building language references). That being said, it still makes for a great resource from which testing and exploration can be done. |
edits