Google has released a minor update to their Dart programming language, version 2.1, focused on improving its overall performance. These improvements have been promised to reach Flutter for its upcoming 1.0 release.

Dart, one of a few programming languages developed by Google, was originally conceived as an alternative language for web developers to compete with JavaScript. While that plan didn’t exactly succeed, Dart has found new life thanks to Flutter, Google’s new cross-platform app development framework, which is still in the “release preview” stage.

In August, Dart landed its major 2.0 update, which brought a whole host of improvements to the language, many of which were designed around accommodating Flutter and its users. Now Dart version 2.1 has hit release, showing further support for Flutter without leaving behind its web development roots.

The main goal of Dart 2.1 was to improve performance, rather than add new features. Web developers will be pleased to know that Dart 2.1 has reduced both the compile time and output size of JavaScript produced by Dart’s dart2js compiler tool. Flutter developers will instead see an improvement in their code’s performance, with as much as a 39% improvement in type checking.

One subtle change in Dart 2.1 that will improve the lives of Flutter developers is the silent conversion of integer numbers to doubles, in cases where a double is expected. This is more about convenience than anything else, as it’s just as easy for a developer to type “.0” behind a number as it is for Dart to convert it automatically.

Dart 2.1 is available now and Dart’s online playground, DartPad, has already been updated. It seems Flutter app developers will need to wait until the Flutter 1.0 release to take advantage of the new Dart changes. We should be learning more about when that release will be early next month at the first ever Flutter Live conference.

You can read more about the other changes in Dart v2.1 like the new “mixin” keyword and compile-time checks from the Dart blog and the official changelog.


Check out 9to5Google on YouTube for more news:

About the Author