4 ms·
I totally agree on that. What makes Dart better than, for example, GWT or Coffeescript? In the end of the day, it's just a new language targeting JS. And that n
by levosmetalo 13y ago
I totally agree on that. What makes Dart better than, for example, GWT or Coffeescript? In the end of the day, it's just a new language targeting JS. And that new language is doesn't have any advanced or interesting features except for the name of the company that created it.
- jhawk28 13y agoJS is one aspect of Dart. Using the same language server side is the other. It really seems like a competitor of JS/NodeJS. They do have the challenge of convincing the JS world that the new system is better enough to warrant learning a new language. If it succeeds, it will be interesting to see if it is the Web side or the server side that drives adoption.
- spankalee 13y agoDart'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.