Adventures in Scripting

Andrew Clinick
Microsoft Corporation

October 11, 1999

I recently returned from a trip back to England where the ECMAScript standards group met to put the finishing touches on ECMAScript Edition 3.0, ready for official sign-off in December. It occurred to me this morning at 4:00 A.M. that an article explaining what goes on at the ECMAScript meetings and what's new in ECMAScript 3.0 might make an interesting column. The added advantage for me: The column will have limited coding, allowing me to concentrate on writing—a good thing this early in the morning!

ECMAScript

Snappy name, eh? Despite being lumbered with quite possibly the worst moniker ever foisted on a language, ECMAScript is actually a pretty unique experience in language design and Web standardization. The group gets on pretty well, and the language is being designed with the input of all parties—rather than standardizing after somebody ships an implementation.

What Happens at the Meetings?

Every month developers from Microsoft, Netscape, IBM, and Hewlett Packard get together to document existing features of JavaScript and JScript®, discuss new directions for the language, and marvel about how much better the weather in San Jose is compared to Seattle. Reading the computer press, you'd think that this meeting would be a complete nightmare, given the marketing battles between Microsoft and Netscape. This couldn't be further from the truth. The ECMAScript meetings are very civilized. Any tension almost always stems from defending a particular design rather than any animosity between the groups.

ECMAScript Edition 3.0

Since the release of ECMAScript Edition 1 in December 1997 and the subsequent minor modification for the International Organization for Standardization (ISO) approval in April 1998, the group has been working on ECMAScript Edition 3.0 and, recently, on early designs for ECMAScript Edition 4.0. Edition 3.0 covers the features introduced by Microsoft and Netscape in the version 4.x browsers, (do while, label, break, continue, regular expressions, and switch) and new features that were designed with input from all members of the ECMAScript working group—notably exception handling, enhanced regular expressions, some formatting functions, and the start of localization support. Once Edition 3.0 is signed off, there will be a standard that covers today's implementations of JScript and JavaScript. This should help reduce any incompatibilities between the browsers.

In the short term, there will be some minor incompatibilities with the Edition 3.0 specification and JScript 5.0, since JScript was released before the standard was completed. We are working on a newer version of JScript that will be 100 percent ECMAScript compatible, so the next release should return us to full ECMAScript compatibility.

In order for a specification to become a standard, it must be approved by the ECMA General Assembly, which meets twice a year—in June and December. To meet the December deadline, Edition 3.0 needs to be completed by mid-October, and there has been much debate while trying to iron out any last-minute glitches.

ECMAScript Edition 4.0

Initial design work for ECMAScript Edition 4.0 has been carried out in parallel to Edition 3.0 and has focused on two main areas: making the language more robust/object oriented and providing more international support. It's still early, but Edition 4.0 promises to make ECMAScript a significantly more capable language—in particular, for those running into problems developing large-scale applications. Essentially, we are trying to combine the more disciplined class and type structure present in other more formal, structured languages (such as Java or C++) with ECMAScript without losing the dynamic, easy to use features that have made ECMAScript so popular. Backwards compatibility is of special importance, so any additions to the language must work within the boundaries of the existing language.

The advantage of designing the new language within the ECMAScript standard process is the pooling of knowledge. This results in a better language and provides a great specification which those implementing the language will be able to use to create a compatible implementation. The last thing the Web development community needs is divergence between JScript and JavaScript, and the ECMAScript working group is aware of this. The desire to come up with one standard leads to some pretty heated debates, but eventually common sense prevails and compromises are reached. It will be a while before Edition 4.0 is ready for prime time, but the JScript team is already working on getting the new features into JScript and hopes to have a beta ready early next year. I'll cover the new features of JScript in future columns.

Summary

Microsoft is committed to being an active participant in the ECMAScript standardization process. We're working on a new version of JScript solely to meet the new requirements of ECMAScript Edition 3.0 and will continue to ensure that JScript remains compliant with the standard. Hopefully, Web developers are beginning to reap the benefits of having a standard for existing scripts and will gain further knowledge with the combined design skills from all members of the ECMAScript group.

Scripting Clinic

Andrew Clinick is a Program Manager in the Microsoft Script Technology group, so chances are, if there's script involved, he's probably had something to do with it. He spends most of his spare time trying to get decent rugby coverage on U.S. television and explaining cricket to his new American colleagues.