days
-3
-6
hours
-2
-3
minutes
-3
-8
seconds
-4
-8
search
All the highlights of the newest release

Dart 2.2 arrives with a new set literal language feature and faster native code

Eirini-Eleni Papadopoulou
Dart
© Shutterstock / Julija Miova  

The Dart team announced the release of the latest incremental update to Dart 2. The 2.2 version brings some important enhancements and changes. Let’s take a look.

Dart is back with a new stable release!

Dart 2.2 is an incremental update to Dart 2 and it brings some significant improvements including enhanced performance of AOT-compiled code and more.

Let’s have a closer look.

The highlights

Faster AOT-compiled code –  improved AOT performance by 11–16% on microbenchmarks at the cost of a ~1% increase in code size. Optimized AOT code is now able to call the destination directly using a PC-relative call, using the program counter.

Extension of literals to support sets – You can now initialize a set and make it const using a convenient new syntax: const Set<String> currencies = {'EUR', 'USD', 'JPY'};. Head over the updated Dart 2.2 language tour for further details on how to use set literals.

Building new language features with the Dart 2 Common Front-End (CFE) – You can now implement set literals initially as a CFE-only feature. The back ends could use the CFE implementation initially and later develop their own native support independently of the initial launch of the feature. This allowed backends to postpone their native support until the performance aspects of this feature were better understood.

New language repository – The language specification source was moved to a new repository. Also,  continuous integration was added to ensure a rolling draft specification is generated in PDF format as the specification for future versions of the Dart language is evolving. Both the 2.2 and rolling Dart 2.x specifications are now available.

Check out the medium post to find out more information on this release or head over to the Dart Language Specification repository for the detailed features.

SEE ALSO: Dart meets Kotlin? kt.dart ports the Kotlin Standard Library

Getting started

You can find Dart 2.2 available for download in the Dart SDK Archive.

If you are working with Flutter, Dart 2.2 is already included. Keep in mind that the latest Flutter release 1.2 will report Dart 2.1.2 which has the same features as Dart 2.2.

Author
Eirini-Eleni Papadopoulou
Eirini-Eleni Papadopoulou is the editor for JAXenter.com. Coming from an academic background in East Asian Studies, she decided that it was time to go back to her high-school hobby that was computer science and she dived into the development world. Other hobbies include esports and League of Legends, although she never managed to escape elo hell (yet), and she is a guest writer/analyst for competitive LoL at TGH.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of