October 24th, 2007


Language Geek Corner: ECMAScript 4

Those interested in web programming and/or programming language design may want to take a trawl through this overview of ECMAScript 4. It's the current state of the proposed standard for the language that is intended to replace current generations of what is usually called Javascript. It's surprisingly radical. When I opened it, my first reaction was "40 pages? Not exactly an overview". But in fact it is: it needs 40 pages just to skim over the changes to the language.

Suffice it to say, the result is a language that is almost (but not quite) completely unlike Javascript. It's a superset, and broadly back-compatible, but really startlingly different in what a normal program looks like. In many ways it's a much more conventional and ordinary object-oriented programming language, but with occasional surprising twists and turns. (For instance, look up the "like" and "wrap" operators.)

ActionScript programmers won't find as much surprising here, since AS3 spun off from the discussion of ES4. But even there, you'll find a lot that's new: there's almost as much enhancement from AS3 to ES4 as there was from old-style Javascript to AS3...