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 Ecmascript.org 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.