Anticipated since February 2018, when Google announced the release of version 2 of its Dart Web programming language as a major version and optimized only for client-side development for the Web and mobile, Dart 2 is officially available since August 6, 2018. Google predicted at the Dart 2 announcement last February that the release not only included the attributes necessary for a modern, versatile language, but also that customer-side development with Dart was productive, fast, accessible, responsive.
In the presentation of the final version of Dart 2 that is now immediately available, Google insists on productivity, performance and scalability. Many improvements have been made, some of which are breakthrough changes with previous versions. In addition, the Web Dart platform has been rewritten. Google qualifies this official Dart revival release as a mainstream language for web and mobile developers.
This release could allow a quick release of Flutter from its beta version. Indeed, Flutter, Google’s multiplatform application development kit is written in Dart, which it takes advantage of preliminary versions of the SDK for several months already. Dart is also one of the main languages used in the development of Fuchsia OS, the operating system of Google that should replace Chrome OS and Android.
Dart 2 focuses on speed of development, enhanced user experiences, and powerful tools that enable quick identification and debugging of errors, while providing a quick code of execution.
According to Google, the use of Dart is growing externally. The Sass style sheet preprocessor has recently been rewritten to Dart to make it faster, more portable and easier to write, according to Kevin Moore, Product Manager at Google, working on Dart. Google also uses Dart, internally, for web development. “Internally, Dart is one of the few languages Google uses for developing Web applications, with millions of lines of code coming from dozens of different projects, including Google Ads, Google Shopping, and our own infrastructure teams. internal. “
So let’s move on to some improvements that Google has announced to have made to the stable version of Dart 2. Several improvements are made to Dart 2. Among others:
A stronger type system
Dart has been adapted to extremely large applications. This gives it, from now on, the ability to detect a large class of problems in applications during analysis and compilation well before they are executed by users. By including run-time checks, Dart 2 can detect type errors. “With Dart 2, you can not enter a state where an expression gives a value that does not match the static type of the expression. This means you can scale your code base to millions of rows, undertake large refactoring projects, and deploy your code with confidence. “
Dart 2 improves the working conditions of the developer
Indeed, Dart 2 allows, for example, to create an instance of a class without the keywords “new” and “const” which become, from now on, optional. The advantage that this improvement brings is to make the code more readable, less cumbersome and easier to type.
Web applications at the heart of Dart 2
“In fact, most Google Dart developments are for Web applications. One of the most important is Google Ads, which feeds billions of dollars from the Web economy. “
In addition to libraries that provide access to the browser APIs provided by the Dart SDK core, Dart 2 supports the creation of more complex Web applications. This is made possible thanks to AngularDart 5 supplied with Dart 2.
Dart 2 improves the amount of code that is processed when the page loads, significantly reducing web page interactivity. 100 new classes, including date, time and a menu of various other components are accessible for web development.
To name just these advantages. The publication of this so-called stable version raises some debates in the field of developers. Indeed, one of the debates concerns non-nullable types. Some people wonder why bring so much improvement to achieve a stable version without adding the non-nullable types. However, Google is apparently already working on it for an upcoming release.
Source: Kevin Moore