3 ms·
> JS is getting nearly every Dart feature with ES6 and ES7 With ES8 or ES9, maybe. By the way, optional named arguments with default values look atrocious in
by ahoge 12y ago
> JS is getting nearly every Dart feature with ES6 and ES7
With ES8 or ES9, maybe.
By the way, optional named arguments with default values look atrocious in ES6.
ES6: function foo({a = 1, b = 2} = {}) {…}
Dart: foo({a: 1, b: 2}) {…}
Dart also supports things like factory constructors, named constructors, method cascades, operator overloading, SIMD, arbitrary large integers, mixins, implicit getters/setters, implicit interfaces, enums, 'a' - 2 is a type error, [0][-1] is a range error, metadata annotations, and of course also optional types.
ES7 might include SIMD and operator overloading.
Another key point is that Dart's doc comment syntax is standardized. It also has an official style guide, a formatter, and a package manager.
To me, these things are also very important features.