Dart Structured Web Programming Language

Google just introduced an early preview of "Dart", a class-based optionally typed programming language for building web applications."Dart targets a wide range of development scenarios: from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent. To support this wide range of projects, Dart has […]

Google just introduced an early preview of "Dart", a class-based optionally typed programming language for building web applications.

"Dart targets a wide range of development scenarios: from a one-person project without much structure to a large-scale project needing formal types in the code to state programmer intent. To support this wide range of projects, Dart has optional types; this means you can start coding without types and add them later as needed," revealed Lars Bak, Software Engineer, Dart Team.

"The language comes with a set of basic libraries and tools for checking, compiling, and running Dart code, all of which will evolve further with your participation. We've made the language and preliminary tools available as open source on dartlang.org," added Bak.

Dart's design goals are:

  • Create a structured yet flexible language for web programming.
  • Make Dart feel familiar and natural to programmers and thus easy to learn.
  • Ensure that Dart delivers high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution.

"Dart code can be executed in two different ways: either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript. This means you can write a web application in Dart and have it compiled and run on any modern browser."

"The Dart VM is not currently integrated in Chrome but we plan to explore this option," explains Bak.

Here is an example code (To run this code, use Chrome, Safari or Firefox. IE9 support is coming soon.)

main() { print('Dart: Structured Web Programming'); }
<script type="text/javascript" src="http://try.dartlang.org/dartboard.dart.app.js"></script>