I have another question. C++ already has types, a main function, collections etc. and is really fast. What are the advantages of Dart over C++ with emscripten?
Dart is much more of a scripting language than C++. It makes as many code issues static warnings and runtime errors as it can, rather than runtime errors, so you can run a partially incorrect program.
Dart is also strongly typed, doesn't have pointers, has GC, has no shared-memory concurrency, uses dynamic dispatch, don't require a compiler (for development), has full access the the DOM (with a much nicer API than in JavaScript!)...
For instance, rather than use callbacks everywhere, most of our async APIs return Futures and Streams. All the "Array like objects", like NodeList, are actually lists in Dart. You can iterate over them and modify them list any other list. element.classses.add('foo') works, as well as some jQuery-isms like element.classes.toggle('foo', show). setInterval is replaced with the standard dart:async Timer class.
There is a ton of cleanup in the dart:html library that makes programming the DOM nice. I'd say there will never need to be a jQuery equivalent in Dart.
You don't, instead you use your existing connections with corporate management and your massive advertising budget to convince managers to force developers to use it. Even if they are perfectly fine using C++ or Smalltalk.
You are missing the point. jQuery fixes the DOM API. Dart's "dart:html" already provides a clean nice-to-use API. All those list-like things are actual Lists. Futures and Streams are also baked into the language. Normalization also isn't needed anymore.
> Apple, FF, MS are all against Dart.
Oliver Hunt isn't Apple. Brendan Eich isn't Mozilla. He doesn't even work for Mozilla anymore.
Mircosoft's JavaScript team also isn't equivalent with Microsoft itself. It also would be pretty weird for them to endorse Dart.
They have TypeScript, which sells Visual Studio, which sells Windows licenses, which sells the Microsoft ecosystem, which sells Windows Server licenses.
That's how they operate and there is nothing wrong with that, really. If you have a large existing JavaScript codebase which you want to keep, TypeScript is a pretty good choice.
Dart is also strongly typed, doesn't have pointers, has GC, has no shared-memory concurrency, uses dynamic dispatch, don't require a compiler (for development), has full access the the DOM (with a much nicer API than in JavaScript!)...