I’ve just completed my first survey of the current ECMAScript 4 implementations. I went through and attempted to compile as many bugs and features as possible, as stated by the ECMAScript 4 specification and double-check them against all the actively-maintained implementations. You can view a nice overview below.
I think it’s fascinating to note that there’s 3 implementations that already have over 25% of all the new features in the language implemented.
View: The raw data
About the implementations:
ECMAScript 4 Reference Implementation (ES4 RI)
This is the reference implementation provided by the ECMA technical group, as a reference for those creating their own implementations.
Tamarin is the joint effort of Mozilla and Adobe to adapt the Open Source Adobe Virtual Machine to match ECMAScript 4 – and run in Firefox 3.next() (via ActionMonkey) and Flash 10.
Update from Tom:
Tamarin VM by itself doesn’t directly support ECMAScript source code. Rather, the subproject esc (written in ECMAScript 4) compiles ECMAScript 4 to abc bytecode that is run by the Tamarin VM.
Spidermonkey is the JavaScript engine currently in Firefox (and other Mozilla-based projects). It’s being actively updated with new features to match the ES4 specification. This project will, most likely, be superseded by ActionMonkey.
Rhino is a Java implementation of JavaScript which is currently being updated to meet the ECMAScript 4 specification.
Futhark is the JavaScript engine that is a part of Opera 9.5 (Kestrel) and will be a part of Opera 10 (Peregrine). It’s being actively updated to match the ECMAScript 4 specification.
Mbedthis has used Javascript as a web scripting language in its AppWeb embedded web server product for several years. More recently, they have been updating the language for use in mobile devices and has developed a C and Java VM for hosting Javascript widget style applications to run in standard features phones. They are tracking ES4 and are upgrading their implementation as the spec is finalized. They are planning to release a test version late Q1 2008 that will implement most of the planned features in ES4. This will be dual license: open source and commercial.
Eivind Uggedal (December 17, 2007 at 3:16 am)
Great work compiling all that data John! I eagerly await the completion of the ECMAScript 4 spec and the maturity of some of these implementations.
alf (December 17, 2007 at 6:20 am)
Do you know anything about the prospects for ECMAScript 4 support in WebKit?
John Resig (December 17, 2007 at 8:39 am)
@alf: They haven’t announced anything yet – although, we can’t really expect them to, either. Apple, generally, never announces their upcoming intentions – especially in regard to supporting a specification. The best that we can hope for is to watch their SVN and catch some ES4 features being committed on the sly.
Tom (December 17, 2007 at 11:59 am)
Might be worth mentioning that the Tamarin VM by itself doesn’t directly support ECMAScript source code. Rather, the subproject esc (written in ECMAScript 4) compiles ECMAScript 4 to abc bytecode that is run by the Tamarin VM. (And I imagine you know that already, but it might be an interesting detail for some visitors.)
Peter Michaux (December 17, 2007 at 1:33 pm)
As far as I know there is no ECMAScript 4 specification. There is a proposal and I think that calling it a specification is misleading. This detail is important and by implementations jumping ahead of approval and implementing the proposal, this seems like an attempt to strong arm the proposal’s approval.
Brendan Eich (December 17, 2007 at 2:00 pm)
Peter: there’s no strong-arming, since nothing is planning to ship based on proposals that has overwhelming market share on the web (contrast with Microsoft).
But, we already shipped JS1.7 in SpiderMonkey as part of Firefox 2 — precisely to get implementation and user experience with parts of the new proposed ES4. This is necessary and proper. It would be a terrible thing to finalize a spec without implementations.
The W3C has a status, Candidate Recommendation, where implementations may proceed. Ecma has no such thing, but ES4 already incorporates work from existing implementations, including AS3 (and JScript.NET, both it and AS3 were based on old JS2 proposals), JS1.5-1.7, and Opera’s JS engines (e.g. destructuring).
This feedback cycle between specification and implementations must go on before a spec can be declared final, without “strong-arming”. Implementors will then have to adjust their advance or experimental implementations when the spec is finalized. We’ve been through this before with ES1-3 and other web standards — we’ll survive this time too.
/be
Pete (December 18, 2007 at 9:55 am)
I wonder how ActionScript 3 (as implemented in Flash Player 9) measures up?
Is JScript.NET worth adding to this chart? On a separate note, does anyone know of any work to get es4 working on the DLR?
John Resig (December 18, 2007 at 11:39 am)
@Pete: Currently, ActionScript 3 is pretty close to what you see in the Tamarin data (or, at least, close enough).
I originally had both JScript.NET and ActionScript 3 in my chart – but opted to remove them simply because they’re both static at this point (they aren’t being actively updated to match the specification). Thus, if there is renewed effort for JScript.NET, I’ll certainly update the chart and add them in.
Simone (December 18, 2007 at 11:45 am)
And what about the javascript engine of Internet Explorer?
John Resig (December 18, 2007 at 12:06 pm)
@Simone: Both Internet Explorer and Webkit (Safari, etc.) haven’t made any statements as to if they’re going to implement ECMAScript 4. In the case of WebKit, no code has been committed, either (which would be a good indicator that they would support it). There’s really no point in showing them, right now, as their “Number of Features” count would be at, or near, 0. If either of them update, I’ll be sure to include the changes in the spreadsheet.
Thomas (December 19, 2007 at 4:23 am)
John, are you planning to re-run your survey on a regular basis, like every quarter? It would be great to be able to see how things evolve over the next year.
John Resig (December 19, 2007 at 6:20 am)
@Thomas: Absolutely. Depending on the progress that’s being made – maybe even monthly. There’s a lot going on, relating to ECMAScript, and it’s hard to keep track of, if you’re not standing right on top of it. I’d like to try and keep everyone updated as best as possible, so be on the lookout for more updates!
Thomas (December 20, 2007 at 7:04 am)
Great. An aside: I was under the impression that you have it all automated, like a bunch of code that you run through each engine, and that creates a proper report. If that’s not the case and you have to collect a lot of the information by hand, you might want to set up a test harness that runs through the list of features. Then maybe people can contribute individual feature tests that you can plug in and you don’t have to do the coding all alone.
Duane (January 4, 2008 at 3:18 pm)
Are you going to update this soon?
D
frrua (January 9, 2008 at 6:05 am)
And what about Screaming Monkey (project to make Tamarin work in IE)? Is this going to happen – is this possible? How are current works on this project?