Dart 2.14 comes with Apple M1 support, new carriers, enhancements and more

Google recently announced the launch of the new version of the programming language "Dart 2.14", which continues the development of a radically redesigned branch of Dart 2 and which differs from the original version of the Dart language by the use of strong static script.

In this new version Apple M1 support is highlighted, the integration of new operators, improvements in some commands, memory management, in rules and much more.

For those unaware of Dart you should know that this, is designed to offer better results through alternatives to some problems of JavaScript, despite the fact that in his presentation no explicit references were made to JavaScript. It is intended to be a simple tool for larger projects and to offer better security.

The point of Dart is not to replace JavaScript as the main web programming language in web browsers, but to offer a more modern alternative. The spirit of the language can be seen reflected in the statements of Lars Bak, Google software engineer, who defines Dart as a "structured but flexible language for Web programming"

Main new features of Dart 2.14

In this new version of Dart 2.4 one of the novelties that is presented is that the SDK already has support for Apple M1 processors, which means both the ability to run the Dart VM, utilities, and SDK components on systems with an Apple Silicon processor, as well as support for compiling executable files for these chips.

Another novelty is in the command «dart pub» in which support has been added for a new service file ".pubignore" which allows you to define a list of files to be skipped when publishing a package to the pub.dev repository. These settings do not overlap with the ".gitignore" ignore list (in some situations pub.dev requires not transferring files that are needed in Git, for example internal scripts used during development).

In the standard library (core) the static methods hash, hashAll and hashAllUnordered are added to the Object class, while for class DateTime, in this the handling of local time has been improved when converting hours between summer and winter time that is not a multiple of an hour.

Also in Dart 2.14 unified rule sets proposed for code analyzer (linter), which provide simultaneous support to verify compliance with the code style recommendations for Dart and the Flutter framework. For historical reasons, the encoding rules for Flutter and Dart were different, and there were two sets of rules in use for Dart.

Dart 2.14 introduces a new general set of rules for linter by default in new Dart projects and the Flutter SDK. Set includes ground rules, recommended additional rules, and specific Flutter guidelines.

In the formatter, optimizations have been made in the formatting of code blocks in cascada, which can significantly improve formatting performance and avoid ambiguous interpretation of the membership of expression elements.

The ffi package adds support for memory allocator, which releases resources automatically. The ffigen package adds the ability to generate typedef definitions of Dart types from the C language.

Of the other changes that stand out:

  • A new triple shift operator (>>>) has been added which, unlike the operator «>>», does not perform arithmetic, but rather a logical shift that works regardless of the sign bit (shift is performed without divide into positive and negative numbers).
  • Removed restriction on type arguments, which did not allow to use common types of functions as arguments with a type.
  • Work has been done to improve the performance of the "dart test" command, which now does not require recompiling tests after changing pubspec, if the version number has not changed.
  • Removed support for compiling in ECMAScript 5 compatibility mode (change will cause loss of compatibility with IE11 browser).
  • The separate stagehand, dartfmt, and dart2native utilities have been deprecated, replaced by built-in commands invoked through the dart utility.
  • Obsolete VM native extensions mechanism. To call native code from Dart code, it is recommended to use the new Dart FFI (Foreign Function Interface).

Source: https://medium.com


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.