According to the development progress of Dart, the third major version of the Dart programming language (Dart 3) will be unveiled in mid-2023. By then, Dart will become a 100% sound null-safe language, and variables are “non-null” by default.
Null references date back to around 1964, when British computer scientist Tony Hoare introduced the concept in the ALGOL language. But he himself called null references his billion-dollar mistake, because it led to countless bugs, bugs, and system crashes that probably cost billions of dollars over the next 40 years.
Dart supports sound null-safety since version 2.12, but it retains the mode of running non-null-safe code or partially null-safe code (hybrid mode).
Dart provides sound null safety through a series of static and runtime checks. Every Dart library that uses null safety will have all the static checking and stricter compile-time error notifications. The same is true for mixed-mode programs that include an empty security library.
Take the mixed-mode null-safety as an example, which allows package maintainers to migrate to null-safety, while users who have not migrated to null-safety can also enjoy bug fixes and improvements when Dart is updated. It’s just that mixed-mode programs cannot get the same runtime soundness guarantees as null-safe programs.null
Pollution from non-null-safe libraries to null-safe code is quite possible.
Michael Thomsen, product manager for Dart and Flutter, explained in a blog post:
Our next release, Dart 3, will complete the development of a fully sane null-safe language. As a final step in this development work, we will be ironing out legacy issues in the Dart language and core library APIs, including removal of deprecated core library APIs and support for non-sanitary empty-safe runs.
The Dart shift will help catch type-related errors at compile time and should improve code readability, maintainability, and ahead-of-time compilation (AOT).
Due to the magnitude of the transition, there will certainly be a lingering period of impact/pain for developers, who would ideally be able to tweak their code before Dart 3 is released. Google has also released a migration tool, and developers can complete the migration with relative ease.
After the release of Dart 3, the next major milestone for the language may be support for compiling Dart code into WebAssembly (Wasm), which will make it possible for Flutter web applications to run as native code in the browser. This work requires the cooperation of the W3C and browser vendors to add support for garbage-collected languages to Wasm through the WasmGC extension.
According to Stack Overflow’s 2022 developer survey, Dart is currently ranked 16th in the popularity of programming languages. Some 6.54% of the nearly 72,000 respondents are using Dart; this compares to 9.16% for Kotlin (15th), 9.32% for Rust (14th), and 9.32% for Go (15th). 13th) was 11.15%, Ruby (17th) was 6.05%, Assembly (18th) was 5.47%, and the Swift programming language was 19th, accounting for 4.91%.
#Dart #sound #nullsafe #language #News Fast Delivery