3 ms·
Dart is great and I like how they are focusing on making it fast and creating a special VM for it (dartium, although it compiles to javascript, too). It's temp
by edtechdev 14y ago
Dart is great and I like how they are focusing on making it fast and creating a special VM for it (dartium, although it compiles to javascript, too). It's tempting to target a compiler to generate dart code, too, instead of javascript. But there is one deal breaker for me - dart can't compile locally in the browser (even a dartium one). It requires a server or else compiling off-line (same issue with Closure Compiler, too). You can't code a dart app on a chromebook, for example (unless you use remote desktop or install ubuntu on it). The future to me is doing all development work in the browser, and only connecting to the server for the server components or version control, like with c9.io and other browser-based IDEs. Even Eclipse has a browser-based version now - Orion.
It's not a huge deal - there are over a hundred alternative languages that compile to javascript out there now, many of which do support compiling in the browser: https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS https://github.com/jashkenas/coffee-script/wiki/List-of-lang...
- michaelwww 14y agoDart source is run by the Dart engine similarly to how JavaScript is run by the JavaScript engine, so you should be able to edit Dart source in a browser and run it if that browser includes the Dart VM (Dartium).
- munificent 14y ago> dart can't compile locally in the browser dart2js is written in Dart. There's some small amount of work needed to self-host it and run the result in a browser, mainly swapping out the file IO API with something that works on the web. I think multiple people on the team have slapped together working examples of this, so it's not a lot of work. It isn't a high priority for the dart2js team right now, though, and they are very careful to avoid taking on responsibility for features or use cases that don't have solid tests. I think before too long, we will have a reliably self-hosted Dart->JS compiler that runs in a browser, we're just focused on other stuff for the moment.