Michael Thomsen, the Project Manager for Dart announced the stable release of the general purpose programming language, Dart 2.2. This version, which is an incremental update to v2, offers improved performance of ahead-of-time (AOT) compiled native code and a new set literal language feature.
Developers have worked on improving the AOT performance by 11–16% on microbenchmarks (at the cost of a ~1% increase in code size). Prior to this optimization, developers had to make several lookups to an object pool to determine the destination address. However, the optimized AOT code is now able to call the destination directly using a PC-relative call.
Dart supported the literal syntax only for Lists and Maps, which caused difficulties in initializing Sets as it had to be initialized via a list as follows:
Set<String> currencies = Set.of(['EUR', 'USD', 'JPY']);
This code proved to be inefficient due to the lack of literal support and also made currencies a compile-time constant.
With Dart 2.2’s extension of literals to support sets, users can initialize a set and make it const using a convenient new syntax:
const Set<String> currencies = {'EUR', 'USD', 'JPY'};
Dart 2.2 includes the up-to-date ‘Dart language specification’ with the spec source moved to a new language repository. Developers have also added continuous integration to ensure a rolling draft specification is generated in PDF format as and when the specification for future versions of the Dart language evolves. Both the 2.2 version and rolling Dart 2.x specifications are available on the Dart specification page.
To know more about this announcement in detail, visit Michael Thomsen’s blog on Medium.
Google Dart 2.1 released with improved performance and usability
Google’s Dart hits version 2.0 with major changes for developers
Is Dart programming dead already?