In association with heise online

10 October 2011, 11:10

Google begins to detail Dart

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Dart logo Rumours that Google was working on a second language – to join Go – to take on JavaScript within the browser have now been confirmed as the company begins to give details of the Dart language, which it says is designed for "structured web programming". The details are available on a new web site, The language designers say they had three goals: create a structured yet flexible language for web programming, make it familiar and natural to programmers, and offer high performance on modern devices. The canonical 'Hello World' example looks very familiar in Dart:

main() {
print('Hello World');

Dart turns out to be a C-like optionally typed language, which the developers say allows a coder to start without types "and add them later as needed". For concurrency, the language supports "Isolates" which can be created, spawned and communicated with by the application. Isolates are part of the core library, which includes Iterable types such as List, Set, HashSet and Queue, Map types such as hashMap and LinkedHashmap, and other types such as Date, Duration, num, String, StringBuffer, Iterator, TimeZone and RegExp. There is also a DOM library for navigating HTML5 documents. A technical overview of Dart can be found the Dart site and examples can be found on the samples page.

The implementation of the language allows for the code to either be executed on a native virtual machine, for server-side use, or compiled into JavaScript so that it can be run on a modern browser. Dart uses a new mime type, "application/dart" to denote its code in HTML script elements. Whether any browser makers will want to support another language in their browsers is open to debate; Dart isn't integrated with Google's own Chrome browser but the developers say they are exploring the option. Currently the Dart language has to be built from the project's BSD licensed source (instructions on the wiki).


Print Version | Send by email | Permalink:

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit