Google's Dart language turns 1(.0)

Google's homebrew language for creating Web apps hits its first full release, but faces long road to displacing JavaScript

Google's plan to replace JavaScript -- one of a couple of such plans, actually -- has hit a major milestone: the release of Dart 1.0.

Originally announced and previewed back in October 2011, the Dart language has been variously billed by Google as "a new language for scalable Web app engineering" and "a language for structured Web programming."

Replacing JavaScript in the browser is one of the obvious missions for Dart, but when discussing the language, Google uses wording that suggests Dart is designed to eclipse server-side JavaScript as well. In a blog post describing the 1.0 release, Dart team software engineer Lars Bak claims, "Dart will be great for writing large Web applications."

The language is reminiscent of C++ and C#, but one of its most touted features -- not shared with those languages -- is optional typing. Google claims this allows for rapid application development, since types can be added later as needed, and there is no discernible impact on performance either way.

Right now, though, no browser runs Dart -- not even Google's own Chrome. Instead, Google has a special build of Chromium, Dartium, which implements the Dart VM and is shipped with the Dart Editor and Dart SDK. No timeframe has been given as to when Dart would be added to Chrome, even as an unstable opt-in feature.

In the meantime, Dart can be compiled to JavaScript using the dart2js tool included with the Dart SDK -- a way to get developers up and running on the language in a way that has real-world payoffs. Google claims Dart runs faster than vanilla JavaScript, in many cases even after it's been compiled to JavaScript, but still asserts the fastest performance comes from running Dart in its native VM.

Displacing JavaScript won't be accomplished casually. It's thoroughly entrenched on the client side, and the explosive growth of Node.js, its libraries, not to mention the culture of software created around it, have made it a fixture on the server side as well. Plus, the language itself is ever evolving, with a sixth revision to the ECMAScript standard in the offing.

But Google's hedging its bets about how much JavaScript can be improved and to what end. The separate NaCl/PNaCl initiatives were launched to allow programmers to put C/C++ code directly in a browser. It's the response to projects like asm.js, which uses a highly restricted subset of JavaScript, translated from C/C++, and runs fast enough for most high-speed applications like gaming.

Infoworld's Martin Heller wasn't impressed with Dart when he looked at it back in 2011 and advocated using CoffeeScript instead. "Whether Dart becomes useful," he wrote, "depends largely on whether it becomes a widely supported standard before the deficiencies of JavaScript are remedied."

Given that the rest of the JavaScript world hasn't stood still while Dart has worked its way toward a 1.0 release, that still seems quite true. Google certainly has the resources to both keep JavaScript development alive and well on its side and contemplate multiple alternatives too.

This story, "Google's Dart language turns 1(.0)," was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Related:

Copyright © 2013 IDG Communications, Inc.