<!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG:--><!--DEBUG:dc3-united-states-software-in-english-pdf-2--><!--DEBUG-spv-->{"id":1274063,"date":"2018-11-25T10:30:00","date_gmt":"2018-11-25T08:30:00","guid":{"rendered":"http:\/\/nhub.news\/?p=1274063"},"modified":"2018-11-25T12:13:29","modified_gmt":"2018-11-25T10:13:29","slug":"dart-2-1-brings-new-language-features-better-usability-and-more","status":"publish","type":"post","link":"http:\/\/nhub.news\/ru\/2018\/11\/dart-2-1-brings-new-language-features-better-usability-and-more\/","title":{"rendered":"Dart 2.1 Brings New Language Features, Better Usability and More"},"content":{"rendered":"<p style=\"text-align: justify;\"><b>Google has released Dart 2.1. This version brings new language features, performance improvements, faster type checks, and better usability for type errors.<\/b><br \/>\nGoogle has released Dart 2.1. This version brings new language features, performance improvements, faster type checks, and better usability for type errors.<br \/>Dart 2, released early this year, had brought a new compiler support for generating code for mobile devices, a reworked web platform tools, and a sound type system (also known as type safe system) to support teams building complex apps.<br \/>The sound type system helps users during the development, informing when a developer violates a contract specified by the types. Now on Dart 2.1, both edit-time and compile time type checks are completed.<br \/>Dart 2.1 has improved the support for mixins. Mixins are a feature that enable developers to reuse a class&#8217;s code in multiple class hierarchies. A new syntax for mixins has been added, the keyword mixin can be used to define classes that can only be used as mixins. It is important to notice that the new syntax mixins prevent users to extending or constructing a mixin class.<br \/>Now mixins can extend other classes (previously they could only extend Object) and invoke methods in their superclass. An example of extending non-Object classes is from Flutter&#8217;s animation APIs, where the SingleTickerProviderStateMixin declares a mixin that implements the general TickerProvider interface.<br \/>The new mixin syntax is required for developers who want to use super inside a mixin.<br \/>Dart 2.1 now infers where an int can be evaluated as a double, an issue commonly experienced by Flutter developers when using an int type where the API expects a double type.<br \/>(Image taken from medium.com\/dartlang)<br \/>Flutter and web developers can benefit from performance improvements. The cost of the type checks has been reduced in Dart 2.1, both for AOT-compiled code and for code run in the VM with JIT compilation. According to Google, performing a code analysis of a large benchmark app that used to take 41 seconds, now takes 25 seconds. In addition, dart2js minified output size has reduced by 17%, and the compilation time is 15% faster.<br \/>Dart 2.1 is now officially supported for protocol buffers. Protocol buffers are a language-neutral, platform-neutral mechanism for serializing structured data, the languages supported are Java, Python, Objective-C, C++, Dart, Go, Ruby, and C#. More information about protocol buffers can be found in the reference documentation.<br \/>Other features available include:<br \/>Dart SDK 2.1 is available for download on the Dart homepage. For Flutter developers, Dart 2.1 is included as part of the Flutter 1.0 release. Google has also made available some samples for int-to-double and mixins.<br \/>Dart plugins exist for a series of IDEs and editors such as, Android Studio, Visual Studio Code, Intellij IDEA, Atom, Vim and Emacs .<br \/>Developers are encouraged to examine the changelog for possible breaking changes.<\/p>\n<script>jQuery(function(){jQuery(\".vc_icon_element-icon\").css(\"top\", \"0px\");});<\/script><script>jQuery(function(){jQuery(\"#td_post_ranks\").css(\"height\", \"10px\");});<\/script><script>jQuery(function(){jQuery(\".td-post-content\").find(\"p\").find(\"img\").hide();});<\/script>","protected":false},"excerpt":{"rendered":"<p>Google has released Dart 2.1. This version brings new language features, performance improvements, faster type checks, and better usability for type errors. Google has released Dart 2.1. This version brings new language features, performance improvements, faster type checks, and better usability for type errors.Dart 2, released early this year, had brought a new compiler support [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1274062,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[93,143],"tags":[],"_links":{"self":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/1274063"}],"collection":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/comments?post=1274063"}],"version-history":[{"count":1,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/1274063\/revisions"}],"predecessor-version":[{"id":1274064,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/posts\/1274063\/revisions\/1274064"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/media\/1274062"}],"wp:attachment":[{"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/media?parent=1274063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/categories?post=1274063"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nhub.news\/ru\/wp-json\/wp\/v2\/tags?post=1274063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}