Google proposes a JavaScript replacement: Dart

By Kshitij Sobti Published Date
11 - Oct - 2011
| Last Updated
11 - Oct - 2011
Google proposes a JavaScript replacement: Dart

JavaScript is a language that owes its popularity to the fact that it is the one and only standard web scripting language that is supported in each and every browser. As web applications are becoming increasingly complicated, JavaScript's weaknesses are becoming ever more relevant.

There are already efforts to use alternative languages on the web. For example, Google's own GWT allows one to develop web code using Java, which is then compiled to JavaScript to be run in a browser. Another language haXe can also be used to write web code that will eventually be converted to JavaScript to run in the browser. Finally CoffeeScript too compiles directly to JavaScript, while adding numerous features and a cleaner syntax.

Now Google has done the same with a brand new language they call Dart. Dart has the following design goals:

  • 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.

Code written in Dart can be compiled to JavaScript, similar to the other languages mentioned above, however the more important thing here is that Dart can run in its own VM like JavaScript and become a full-fledged member of the web. This is not to say that CoffeeScript or haXe couldn't do the same just that with Google behind it, the likeliness of Google Chrome shipping with a Dart VM that allows web applications written in HTML CSS Dart is a lot higher.

You can find out more about Dart from its new home here, where you can see samples of the language, learn tis syntax and even run it straight in the browser. With the option of compiling Dart to JavaScript, and the possibility of native support in browsers (or at least in Google Chrome) it seems like a safe bet for web developers.