martedì 6 novembre 2007

ECMAScript 4

ECMAScript is the standardized form of the language known as JavaScript. In its current incarnation, it is a nice little prototype-based object language that unfortunately is plagued by some warts (peruse this blog post to read about some of them) and by DOM implementation riddled with bugs and security problems. This, according to Douglas Crockford, makes it “the world’s most misunderstood programming language”.

The guys at are actively working on a new revision of the standard, and have recently published a new proposal for ECMAScript, edition 4, complete with a reference implementation. This new proposal looks like a 180° turn from the current language, moving to a class-based object orientation paradigm, with multimethods, optional static typing, etc.

The proposal has been well-received by programming-languages researchers and aficionados, such as those at Lambda the Ultimate. But many others, such as Dave “Smalltalk” Thomas, have voiced their opposition to this new standard:

Just browsing through the wiki shows a language which has prototypes, classes, multi-methods?, static types, dynamic types, etc, etc. This reminds an old guy like myself of other large design by committee languages such as PL/I, Algol 68 and ADA. These ambitious efforts all had smart people involved in the design and implementation but were unfortunately far too complex and came to the market too late. JS is intended to be a language for the people, not another language that only technical wizards can understand. If you are an Ajax developer or care about dynamic languages I suggest that it is time for you to speak up and help put ECMAScript 4 on a much less ambitious path than is currently being charted. Less is truly more when it comes to languages.

My friend Riffraff has too a good critique of the proposal:

The second system syndrome is that evil effect that often happens when redesign a small, working system so that it becomes a huge leviathan built by piling new features over new features.

Today I was reading the overview of ECMASCript 4 from, and I got this very bad feeling that maybe the fourth version of ES, is suffering of an extremely strong case of this problem.*

To make things worse, it looks like there’s some sort of fracture in the ECMAScript 4 working group, with Adobe and Mozilla on one side, and Microsoft and Yahoo! on the other.

In my opiion, all of this doesn’t bode well for the new language. Are we going towards another browser war?

Nessun commento: