Sunday, October 22nd, 2006

Specifying ECMAScript 4 via ML

Category: JavaScript

Brendan Eich has mentioned that ECMAScript Edition 4 will be specified in ML.

Dave Herman says:

One of the immediate benefits of this approach will be that our definition will also serve as a reference implementation. LtUers will of course recognize this as the approach of “definitional interpreters”.

Our initial intention was to write a custom specification language that would be tailored to our purposes, with just the right core control features and datatypes to serve as an appropriately abstract model of ECMAScript. But before long, we realized that we were pretty much describing ML. Rather than specifying, implementing, and documenting another programming language that was 80% ML, why reinvent the wheel?

The benefits of this approach are many: a definition in a formal language that itself has a clear and precise definition, the luxury of many robust and high-performance implementations (we’ll be using OCaml extended with first-class continuations), and free “technology transfer” from all the existing ML literature and communities.

And finally, by releasing real software–written in a direct functional style–for reading, type-checking, and evaluating ECMAScript programs, we’ll be providing a standard set of tools for static analysis and other research on the ECMAScript language.

What is going to be in ECMAScript Edition 4? Some proposals are:

  • proper tail calls
  • iterators and generators
  • let expressions
  • optional type system
  • continuation marks
  • meta-objects

Posted by Dion Almaer at 12:50 am
2 Comments

+++--
3.7 rating from 9 votes

2 Comments »

Comments feed TrackBack URI

It would be nice if Dave Herman would quote the mailing list entry. Those of us who are not subscribed to the list cannot see the archive because it’s a private list.

Comment by Shelley — October 22, 2006

Shelley, it’s a public list. You can subscribe to it by mailing to es4-discuss-request@mozilla.org with subscribe in the subject and/or body (use help instead of subscribe to get a list of commands). The list archive is at https://mail.mozilla.org/private/es4-discuss/.

/be

Comment by Brendan Eich — October 23, 2006

Leave a comment

You must be logged in to post a comment.