3 ms·
The very first example there says > // Note: This will only work in Dartium (a build of Chromium with Dart VM) This isn't a temporary issue. Google might add
by azakai 15y ago
The very first example there says
> // Note: This will only work in Dartium (a build of Chromium with Dart VM)
This isn't a temporary issue. Google might add the Dart VM to Chrome, but the chances of it showing up in any other browsers are close to 0.
Aside from that, yes, Dart improves on some syntax issues like you said. But the compiling-to-JS approach lets you do a lot more, you can write CoffeeScript or C++ or C# or Java and compile those to JS as well.
- spankalee 15y agoThat snippet is showing a comparison of JavaScript and Dart as native languages. To get the Dart sample to work in browsers without native Dart, just add this tag: <script src="http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"></script> Try dropping the FUD.
- azakai 15y agoThe fact remains, proper integration of Dart - the way the very first example wants to show us - will not work in any browser but Chrome+Dart. It's a problem for any language that wants to run in a web browser except for JS.