Critics call foul as Google takes aim at JavaScript with Dart

Google is preparing to unveil a new client-side programming language for the …

Google is developing a new scripting language for the Web that the company hopes will eventually supplant JavaScript. The language, which is called Dart, will be presented next month during an opening keynote at the GOTO conference.

Few technical details about the programming language are available at this time, but an internal Google memo that was authored last year and subsequently leaked offers some insight into the company's strategic goals for the project.

Dart has recently drawn heavy criticism from some prominent figures in the Web standards community, including JavaScript architect Brendan Eich. Eich originally created JavaScript in 1995 while at Netscape. The language was submitted to ECMA for standardization the following year. It provided early Web developers with the ability to perform useful tasks—such as programmatic form validation—on the client side. Despite its extreme simplicity and multitude of idiosyncrasies, JavaScript has weathered the explosive growth of the Web and has kept up with the increasingly complex workload imposed on it by modern Web applications.

Efforts to improve JavaScript at the specification level are ongoing, but have been slow due to a number of technical and political reasons. The ECMAScript 4th Edition (ES4) proposal, which was published in 2007, laid out a plan to radically overhaul JavaScript. The proposal was largely authored by Mozilla, Adobe, and Opera but faced strong resistance from other major stakeholders, including Microsoft and Yahoo. The split led to a public dispute in 2007 over the future of the programming language and its role in Web development.

A 2008 compromise ended the stalemate and laid out a new roadmap. An incremental update to the standard was issued in 2009, but a more ambitious update called Harmony was planned for the future. Harmony is currently under active development within the JavaScript standards committee and is on a positive trajectory for eventual adoption. Harmony, as the name suggests, represents a more consensus-driven vision than the contentious ES4 proposal.

Alongside this productive effort to deliver an acceptable update to the language standard, JavaScript has benefited over the past few years from other changes in the browser technology space. Browser vendors have implemented radically more efficient JavaScript runtimes and hope to eventually deliver performance that rivals native code. Consistency between JavaScript implementations has also greatly improved. Browser vendors have embraced shorter development cycles, ensuring that performance improvements and emerging standards reach end users faster than ever before.

This confluence of positive factors has made JavaScript a healthier part of the Web technology stack. The programming language is in a better position than before to keep up with the demanding requirements of next-generation Web applications.

Despite all of the progress that has been made over the past few years, Google takes the view that JavaScript's limitations are too fundamental to be overcome through revisions. The search giant wants a clean break and a new language, designed from the ground up for Web development.

Google is creating the new Dart programming language to "leapfrog" JavaScript and deliver a better-designed alternative that the company wants to eventually see integrated into Web browsers. An internal Google memo authored by Google's Mark Miller describes the rationale behind Dart, stressing the technical weaknesses of the Web as a platform and the need for a more competitive development stack.

"Complex web apps—the kind that Google specializes in—are struggling against the platform and working with a language that cannot be tooled and has inherent performance problems. Even smaller-scale apps written by hobbyist developers have to navigate a confusing labyrinth of frameworks and incompatible design patterns," the memo said. "The emergence of compelling alternative platforms like iOS has meant that the web platform must compete on its merits, not just its reach. Javascript as it exists today will likely not be a viable solution long-term."

To address this challenge, Google imagines a two-pronged approach: improving the existing JavaScript language through the standards process and simultaneously developing an eventual replacement. Miller's memo strongly emphasizes the importance of both approaches—which he views as complementary and interdependent, contending that each one in isolation would likely fail.

Google recognizes that developing a new language, moving it through the standards process, and winning the support of other browser vendors is going to take an extremely long time. Even with an optimistic timeline, a new scripting language for the Web that is introduced today could easily take six or seven years to see widespread adoption.

As Google sees it, working with other browser vendors to continue improving the JavaScript standard is necessary so that Web programming won't stagnate while Dart is maturing. Miller also points out that a strengthened JavaScript will be the only fallback position if Dart fails.

Google's technical plan is to start by implementing a compiler that translates Dart code into JavaScript. This is similar to how CoffeeScript and other existing third-party Web languages are already used. As Dart matures, Google plans to natively support the programming language in Chrome and persuade other browser vendors to support it, too. The memo says that third-party developers who start using the language will be able to continue relying on the compiler in the event that other browser vendors decide not to bake in support for the language.

As the language stabilizes, Google intends to work with standards bodies to open the language and formalize the specification. The search giant also intends to eventually expand it to other problem domains, including server-side development and mobile programming. Miller even hints that it could eventually be used on the Android mobile platform.

Governance

Although the notion of pursuing a clean break and introducing a new client-side programming language for the Web is intriguing, it's also highly problematic. A new language to supplant JavaScript would have extraordinarily far-reaching implications for the Web. As such, it would need to be created in a manner that reflects that gravity: complete transparency and broad collaboration with other stakeholders.

Google has already hit a foul ball on that front, because the Dart language and baseline requirements were drafted entirely behind closed doors. The fact that the Web development community and other browser vendors had to find out about this plan through a leak is deeply troubling. It is simply not reasonable for one team to unilaterally redefine the rules of the game halfway through the season and expect all of the other teams to play along.

The open governance model of the Web has been vital to its survival and is equally essential to its future sustainability. A programming language that is defined and controlled by one vendor is neither desirable nor appropriate for the Web at this stage in its evolution. Google's poor track record on open governance makes it difficult to place faith in the company's motives and trust it to be a responsible steward of a critically important Web technology.