« Vectors in ECMAScript 4 | Main | Type Parameters in ECMAScript 4th Edition »

ECMAScript 4th edition Reference Implementation M2

Last week the ES4 working group released a new version of the ES4 reference implementation (RI). The new build, M2 (for Milestone 2), replaces the M1 build that was posted back in November 2007. Today, one of the most active implementors of the RI, Graydon Hoare of Mozilla, posted a detailed "punch list" of all the proposed features that are either included or not included in the latest version of the RI.

Here's a little background about the RI for those of you who haven't been following the progress of the ES4 working group. Most of the working group members found the pseudo-code used in the ES3 specification hard to work with in that it was both hard to get the specification correct and hard to implement. As pseudocode, it was also hard to identify bugs. Not wishing to propogate these same problems into the next edition of the specification, the working group decided to create an reference implementation that serves several purposes. First, it provides an initial proof of concept that the new edition of the language can indeed be implemented. Second, it provides a much more precise way to specify what the language is supposed to do. Third, it makes it much easier to identify bugs in the specification.

After considering a few languages, the working group settled on Standard ML '97 and use a compiler/programming environment called Standard ML of New Jersey, or SML/NJ for short. That need not concern you, however, if you just want to play around with some of the new features because Dave Herman has created a set of binaries for Windows, Mac OSX and Linux that you can download from the ecmascript.org downloads area.

Here is Graydon's punch list of features that are in the "M2" build of the RI (from his original post to ES4-Discuss):

Implemented, may have bugs:

  • classes and interfaces
  • namespaces
  • pragmas
  • let, const, let-const
  • iterators
  • enumerability control
  • type expressions / definitions / annotations
  • runtime type checks ("standard mode")
  • nullability
  • destructuring assignment
  • slice syntax
  • hashcode
  • catchalls
  • map & vector
  • date & time improvements
  • meta objects
  • static generics
  • string trim
  • typeof
  • globals
  • expression closures
  • name objects
  • type operators (is / to / cast / wrap)

Implemented and partly working, but still in flux / work to do:

  • inheritance checking
  • strict mode
  • type parameters
  • structural types
  • numbers & decimal
  • getters & setters (structural part is incomplete)
  • packages

Partially implemented / not yet working:

  • program units
  • generic function
  • updates to unicode
  • updates to regexps

Unimplemented:

  • generators
  • tail calls
  • triple quotes
  • stack inspection
  • reformed with
  • resurrected eval (eval exists but may be wrong)
  • help for the argument object
  • "this function" / "this generator"

In case you missed it above, here is a link to the downloads area of the ecmascript.org site if you want to download binary versions of the RI (The source code is also available on that page):

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)