Google’s general-purpose programming language Dart is getting a big reboot. The company announced the release of Dart 2 with a new vision for the language, which is to optimize it for client-side development for web and mobile.
“With Dart 2, we’ve dramatically strengthened and streamlined the type system, cleaned up the syntax, and rebuilt much of the developer tool chain from the ground up to make mobile and web development more enjoyable and productive,” Anders Thorhauge Sandholm, product manager on the Dart team at Google.
In addition, the language incorporates lessons from early adopters of Dart such as Flutter, AdWords, and AdSense. On the mobile side, Google’s UI framework Flutter used Dart for ease of learning, developer velocity and high-performance.
“With Flutter and Dart, developers finally have the opportunity to write production-quality apps for Android, iOS, and the web with no compromises, using a shared codebase. As a result, team members can fluidly move between platforms and help each other with, e.g., code reviews,” Thorhauge Sandholm wrote.
On the web side, AdWords and AdSense used Dart to manage ads, catch bugs, scale apps and increase code quality.
“The AdWords front-end is large and complex, and is critical to the majority of Google’s revenue. We picked Dart because of the great combination of perf and predictability, ease of learning, a sound type system, and web and mobile support,” said Manish Gupta, VP of Engineering for Google Adwords.
Dart 2 also tackles UI as code to provide a better experience and reduce the amount of context switching needed. According to the company, it can be frustrating to have to switch between the UI markup language and the programming language you are writing the app in.
“Dart increases developer velocity because it has a clear, succinct syntax and is able to run on a VM with a JIT compiler. The latter allows for stateful hot reload during mobile development, resulting in super fast dev cycles, where you can edit code, compile and replace in the running app on the device,” the company wrote. “With the improvements announced today, Dart 2 is a productive, clean, battle-tested language that addresses the challenges of modern app development.”