Monday, October 10, 2011

Dart, What's that? Teascript!!

In a dramatic turn of events, a year after Google announced that it has aborted Gears development in favour of HTML 5, Google has released a client-based competitor for JavaScript in the name of Dart. Indeed, the main goal of Dart is to replace JavaScript (aka Coffeescript) as the main built-in scripting language in web browsers to try to solve JavaScript's inherent problems.

In an internal circulation that was leaked out, Google says that the complex web applications that it specializes in are struggling against the JavaScript platform and working with, [JavaScript], a language that cannot be tooled and has inherent performance problems. Google also states that the future of JavaScript State of affairs for building delightful applications on the web today is far too difficult as the cyclone of innovation is increasingly moving off the web onto iOS and other closed platforms.

Google outlined two ways to approach the JavaScript problems:
  • either to try to evolve Javascript
  • or to push for a new language that addresses core problems in Javascript that can’t be repaired easily or quickly.
The “evolve Javascript” option is relatively low risk, but even in the best case it will take years and will be limited by fundamental problems in the language (like the existence of a single Number primitive). Javascript has historical baggage that cannot be solved without a clean break. Thus, although it’s low risk, it’s also relatively low reward.

The “clean break” option is extremely high risk--it will be a huge challenge to convince other browser vendors to rally around a new language--but is the only way to escape the historic problems with Javascript. Thus, its high risk is matched by the potential for a very high reward--a classic leapfrog strategy.

In November 2010, Google took a bold step and worked on plan B to conceive a new baby in the web programming world, Dash who was later on renamed to Dart. In the early hours of 10th October 2011, Google finally unveiled the newborn.

According to an official blog post from Google, Lars Bak, one of the tech leads of Dart Team, who also happens to be the mastermind of Chrome the browser from Google, reveals that Dart aims at:
  • providing a structured yet flexible language for web programming,
  • bringing a familiar and natural feeling to programmers, thereby and making dart easy to learn.
  • Ensuring high performance on all modern web browsers and environments ranging from small handheld devices to server-side execution.
Dart code can be executed either on a native virtual machine or on top of a JavaScript engine by using a compiler that translates Dart code to JavaScript.  Dart is only supported on Chrome, Firefox and Safari as they are working on an Internet Explorer solution.

The language and its preliminary tools available as open source on dartlang.org.  There are also rumours that they are developing a cloud-based IDE called Brightly, that will perhaps be the first Dart application.

1 comment: