Google’s bid to fix Javascript, Dart, is ready for the real world

Dart SDK’s first developer-ready version is now available.

A year ago, Google unveiled a programming language called Dart in an attempt to fix what’s wrong with JavaScript. The hope was to eventually “replace JavaScript as the lingua franca of Web development."

At the time, it was just a technology preview, more useful for people interested in developing Dart itself than for those interested in developing applications with Dart. That’s not to say developers couldn’t build with Dart, but the language needed a complete set of development tools to get a sniff of the mainstream. And that’s exactly what Google delivered today, with what it calls the “first developer-oriented version of the Dart SDK.”

The key improvements and features, according to Google software engineer Lars Bak, are as follows:

• A faster Dart Virtual Machine that outperforms even V8 on some Octane tests

• A new Dart to JavaScript translator that generates fast and compact output

• An HTML library that works transparently on modern browsers

• A library to interoperate with JavaScript code

• An easy to use editor

• Pub, a new package manager

• Dartium, a Chromium build with native Dart support

• A server-side I/O library

• A language specification describing the Dart semantics, including new features

Although Google is seeking to build a language that is simpler and faster than JavaScript, it won't replace JavaScript at this early date. While developers could build applications in Dart alone, Google is providing tools to compile finished code to JavaScript, an essential step in making applications that can work in extant browsers.

The aforementioned Dart Virtual Machine will also let developers test applications in Web browsers without having to compile to JavaScript first. To that end, Google in February released a version of Chromium called "Dartium" that embeds the Dart Virtual Machine.

Downloading the Dart Editor will give developers a copy of both the open source Dart SDK and Dartium. More improvements are on the way.

"Over the following months," Bak wrote, "we will continue to work hard to evolve the SDK, improve Dart’s robustness and performance, and fine-tune the language while maintaining backwards compatibility."

Promoted Comments

Why are we bothering with developing new languages when what we should be doing is developing a web standard for a universal bytecode + VM? Hell, use the JVM or the CLR, just as long as it doesn't tie me to a specific language. Dart may be better than JavaScript (I would hope so) but that doesn't mean it's a silver bullet. If we create a standardized bytecode, it doesn't matter what language produced it.

That's what I want. I want to be able to choose between dynamic and static typing, between low level, high performance bit fiddling and very high level DSLs.

We're already sort of doing that with all the JavaScript transpilers (CoffeeScript, TypeScript, ScriptSharp, GWT, etc) but those basically use Javascript as the low level bytecode and JavaScript is unbelievably poorly equipped to act as bytecode (verbose and ambiguous).

The fact that DART was born with a "JavaScript translator" and "A library to interoperate with JavaScript code" tells us that Google knows full well what hurdles it faces, the issues most often cited for DART being unlikely to gain any real traction. And I would say that the day that they abandon those translators and compatibilities, is the day that DART dies. I just don't see other browser vendors implementing it without a huge amount of pressure being applied.

But I have to wonder if perhaps they really wanted it for some internal use, and are handling the development publicly to sort of test the waters, set the stage.