Recs.
Updated
SpecsUpdate
Pros
Pro Great async language support
Dart is a single threaded programming language. So if any piece of code blocks the execution of the program, the program practically freezes. To avoid this Dart makes use of asynchronous operations which let your program run without getting blocked. This is done through Future objects.
A Future is an object which represent a means for getting a value at a certain point in the future. A function may invoke a Future and when that happens, two outcomes can be achieved:
- The function is unable to return a value, so it queues up work to be done and returns an uncompleted Future object.
- Or later when a value is available to be returned, the Future object completes with that value.
Pro Optional type system
Optional type system makes it easy for beginners to start and evolve programs by adding types later.
Pro The fastest and performance driven
With using own VM, Dart is the fastest language for the web. Dart is built with performance in mind. It is a nasty decision by Microsoft and Apple by not embedding Dart VM in their own browsers. Though, Compile to js version is also faster than any other Compile to JS languages.
Pro A lot of tools are available to help in developing with Dart
Dart has a lot of tools available which help with developing Dart applications. Some examples of those tools include:
- pub - package and dependency management and build tool
- analyzer - static syntax analysis with linter, quick fixes, autocompletion support for easy IDE integration
- test - powerful and flexible testing framework and test runner
- dev_compiler - generate reusable JS instead of tree-shaken minified JS output (work in progress)
- dartfmt_ - source code formatter
- server-side VM
- observatory - a powerful tool for profiling and debugging running Dart code (for Dartium and Dart server code).
Pro Great standard library
Dart includes a truly comprehensive core library, making it unnecessary to include disparate, external resources for basic functionalities Other than reducing the need to pull in various 3rd-party utilities this also ensures that all Dart code looks and feels the same.
Out of the box, the developer gets core libraries to help with: async, collections, strings, regexps, conversions, formats, file I/O, math, typed data, and more.
Pro Transpiled JavaScript code works on all browsers
In Dart many browser differences (subtle differences and also missing features) are abstracted away or polyfilled. When Dart is transpiled to JS the output works on all supported browsers. There is usually no need to load polyfills or to consider browser differences during development. No need for libraries like jQuery to make the same code work the same on all browsers.
Cons
Con No strong community involvement in the work on the specification, grammar, language
Dart developers rarely take suggestions on improving the language in consideration. Although the developers have been suggesting changes since 2011 in the mailing list, these suggestions are rarely included in the Dart Enhancement Proposals (DEP) which is mostly written by Google engineers.
Some people in the Dart community feel that this is inadequate since a lot of programmers who are part of that community are highly respected engineers and professionals who may have valuable input to give.
Recommendations
Comments
Flagged Pros + Cons
Pro Crossplatform
Dart does not just compile to JavaScript, it also compiles to native code on mobile platforms like iOS and Android as demonstrated by flutter.io.