we’re from javascript, and we’re here to help

More than a decade ago, JavaScript ushered in a transformation of the web browser from simple navigator of pages to platform for universal applications. In the intervening years, JavaScript has been standardized as ECMAScript, revised twice in that context to include things like exceptions and regular expressions, used as the basis for languages like ActionScript, and embedded in everything from web servers to DVD players to video games — and it’s become the most widely-used programming language in the world. It’s the big dog on the web, you might say.

What does one do for an encore, looking back at a decade of one’s language being taken to places scarcely imagined, used to build billions of dollars of value, and employed by millions of programmers around the world? I would like to find out myself some day, but for Brendan Eich, the father of JavaScript, the answer is clear: you make it better.

For the last couple of years, language researchers, application developers and web browser developers in the ECMA TG-1 committee — and Brendan, of course! — have been working to craft an evolution of the JavaScript language to remove headaches that modern developers are hitting and take advantage of the lessons learned over those years of watching people use and learn and love (and hate) the language. The result of that group’s work, and of the feedback of many developers contributing in the open, will be finalized soon as ECMAScript Edition 4. It represents a huge amount of effort, and the distilled wisdom of literally hundreds of people. And it represents an amazing opportunity for web developers to take their own software to the next level of power, performance, correctness and clarity.

What will developers have to do to take advantage of these things? Virtually nothing, to start: because of the relentless focus on compatibility and interop between JS1 objects and code, they will in many cases have things just start working faster and better because the authors of their favourite toolkits and tools have made use of new capabilities in the language. The specification has been improved to be clearer and easier to reason about, and had many bugs fixed, so things will work more consistently and it will be easier to use tools to manipulate JS programs reliably. The type system improvements give authors more control over how JS’s powerful dynamism affects their scripts, and will let them better preserve their important invariants, for security and correctness and performance reasons all.

And if you as a developer find that you’re hitting a limitation of JS1 that you want to get beyond, for reasons of performance or scale (developer-count as well as line-count or object-count), or because you want to use some of the new features to streamline your code, you can add those elements to your code incrementally. You don’t need to switch all your scripts at once, or worry about what happens when you pass objects between your JS1 widget library and JS2-enhanced animation library. The language developers have been worrying about that on your behalf for a long time, and they take these issues very seriously. Breaking the web is not an option, and there have been great (if grim) examples of what happens when languages with large installed bases forget that compatibility matters.

There’s a lot to talk about when it comes to JS2, and there are definitely a lot of new features and goodies for developers to adopt as they choose to. With JS1, Brendan and others managed to bring functional concepts, first-class functions and other relatively advanced language features to a straightforward and “newbie-friendly” language, and JS2 will bring more of the same accessible power to the millions of people out there who are making great software, large and small, in JavaScript.

I’m going to be writing more about JS2 in the coming days and weeks, because I think it’s one of the most exciting things coming to the web, and it brings new things in a way that I feel is very web-like indeed: incremental, compatible features based on real-world experience, developed in a collaborative standards environment with a pretty decent (though not yet perfect) level of openness. Look for more on JS2′s type system, where you’ll see JS2 available, more details about compatibility with JS1, and other neat things about the next version of the web’s scripting language. It’s gonna be fun.