Poor JavaScript, first you get stuck with a terrible name, then years of horribly busted implementations and web pages contaminated with unrecognizable code, and now everyone hates your syntax.

If you too are a JavaScript hater and CoffeeScript leaves a sour taste in your mouth, and you happen to love Java syntax, Google gives you another option: Dart.

For client-site execution (in the web browser) Dart, like CoffeeScript, is translated to JavaScript first. But unlike CoffeeScript, Dart also comes with a virtual machine for server-side execution (without translation to JavaScript), which the Dart team says will allow you to reduce context switching by allowing you to write your entire application in a single language.

Google is also proposing a new mime type “application/dart” with the hope that browsers will adopt execution of Dart directly without the need to translate to JavaScript first. It will be interesting to see if Google has enough pull and Dart has enough of a following to actually get browser makers to implement/include a Dart interpreter.

After spending some time digging through the rather large source tree for Dart, it’s not clear to me how the DOM library plans to deal with JavaScript compatibility issues between different browsers (IE I’m giving you the evil eye). CoffeeScript on the other hand has an interesting position because it’s a superset of JavaScript which means you can continue using your favorite JavaScript framework (e.g. jQuery, Prototype, etc.).

Better analysis from a Java perspective, with syntax examples, can be found in Axel Rauschmayer’s article on Dart from yesterday.