There are some prejudgments about Dart, usually from frontend developers who have never used it or for some reason decided that they don't want to use it at any cost:
dart2js
compiler.This brought some letdowns from fellow Dartisans, but from a practical point of view, it's probably for the best because even with native Dart support, you would still have to compile your code to JavaScript for other browsers.
The major problem with Dart is that it's hard to use with existing JavaScript libraries and in real-world applications you'll probably choose between using only Dart or not using Dart at all. This was also one of the reasons why the Angular team didn't choose Dart as their language of choice for Angular 2.0. There's also an experimental compiler in development that is designed to generate readable JavaScript code (https://github.com/dart-lang/dev_compiler).
dart2js
compiler is an essential part of the Dart SDK. Dart would never have become popular among developers if the compiler didn't work reliably. For this reason, it's very unlikely that the Dart SDK would come with broken dart2js
. However, it's true that if your project uses third-party packages, such as AngularDart, which uses custom transformers, it might produce broken code.dart2js
is doing pretty good as well. Dart is continuously benchmarked and you can see the results at https://www.dartlang.org/performance/. However, it's questionable whether these tests represent typical use cases for web apps.There are obviously situations where using Dart is too complicated, for example, when you're creating a website and all you have to do is a few fade in/out animations, handling click events, or appending some HTML elements. In these situations, it doesn't make sense to use Dart and it's better to stay with JavaScript. The real advantages of Dart come with more structured and complicated apps.
18.221.254.61