As we’ve discussed before here on LtU, the reference implementation of ECMAScript is being written in Standard ML.
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.
Damn. Now I do not only feel the strong urge to learn Scala, but also JS2 and of course ML. Seriously, if each day had 72 hours, I would not feel bored :-)