The Dart Programming Language
Google tries it again with Dart giving to the language a second chance and placing it as a competitive way to develop Android and iOS native mobile applications
Dart was designed and developed by Lars Bak and Kasper Lund at Google with the initial intent of the company to deploy a Dart VM inside it's market leader browser Chrome in order to gain optimal execution speed for Dart developed applications adding in fact a new programming language in the browser arena.
Despite getting standardized by Ecma (ECMA-408) and being released under a very permissive free software license (BSD like license), Dart did not gain wide acceptance. Indeed the language yielded harsh criticism to Google by other browser vendors and standard organizations who accused the company of using it's market leadership position to impose a proprietary technology.
Today Dart offers three execution possibilities for applications developed with the language:
- Run in the standalone Dart VM available for Windows, Mac OS X and Linux systems
- Compiled to native ARM machine code and run in mobile platforms both with Android or iOS operating systems
First glance at the code
Example: The classic "Hello world" program written in Dart:
Main features of Dart
Optionally statically, strongly typed
While in its version 2 type annotation is mandatory in Dart, the language offered this as an optional feature in the past. In Dart everything is an object and variables are references to objects. Special support is provided by the language for the following built-in data types:
|int||numeric integer values|
|double||numeric 64-bit (double-precision) floating-point numbers (IEEE 754 standard)|
|String||Dart strings are sequences of UTF-16 code units|
|Map||objects that associate keys and values.|
|Runes||these are the UTF-32 code points of a string|
|Symbol||represent operators or identifiers declared in a Dart program|
|Function||in Dart even functions are objects|
Dart is an object-oriented language with classes and mixin-based inheritance. Every object is an instance of a class, and all classes descend from Object. Mixin-based inheritance means that although every class (except for Object) has exactly one superclass (multiple inheritance it not allowed), a class body can be reused in multiple class hierarchies. Interfaces are not present in the language reverting Dart to the C++ way of using abstract classes to implement interfaces.
Dart is a single-thread programming language, still it has isolates to handle concurrency programming.
Free and open source
Dart is free and open source software (BSD like license).
Notable softwares/platforms/products written in DartGoogle uses internally Dart for many critical web apps often together with AngularDart. The next generation of Google AdWords is built in Dart. Google Fiber’s latest web app is built in it. So is Google’s internal CRM.
Best books for learning Dart
|Dart for Absolute Beginners|
For experienced programmers
|The Dart Programming Language|
The most authoritative description of DartGilad Bracha is a software engineer at Google where he works on Dart. In this book he covers both language semantics and the rationale for key features, helping you understand not just what Dart does, but... (continue on Amazon)