10 ms·
Dart's better than GWT because it's a modern language that is actually designed the be compilable to JavaScript. Not all of Java is compilable to JS, so GWT is
by spankalee 13y ago
Dart's better than GWT because it's a modern language that is actually designed the be compilable to JavaScript. Not all of Java is compilable to JS, so GWT is really a subset of Java, but it's still verbose. Dart's much more concise and easier to translate to JS, so it's compiler is much faster too, but also adds getters and setters, mixins, operator overloading, implicit interfaces (every class defines an interface), top-level functions, optional typing, (and things Java's just gettgin:closures, collection literals). Dart and it's core libraries being designed for a single-threaded, asynchronous world is a big deal and makes it much more at home in a browser than Java. Where they're similar is in the ability to have tools and libraries that work well together, and mostly sane semantics.
Dart's better than CoffeeScript because it dramatically improves on the semantics of JavaScript. Libraries, classes, interfaces, mixins, only explicit type conversions, lock scope, privacy, no monkey-patching, fixed this binding, final, constructor initializers, optional typing... these are all things that make large programs easier to manage, and tools easier to write. CoffeeScript offers a couple of minor fixes like this binding, but basically is just a different syntax for JS. If Dart were just a different syntax, it wouldn't be worth it, but spend some time with the Editor (or WebStorm) and see the static warnings and errors, refactoring, code-completion, code navigtion, etc. and you'll see how it's miles better for teams.