Paul Krill
Editor at Large

Dart language taps machine learning for code completion

news
Sep 11, 20192 mins

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

accuracy - dart on the outer edge of the dart board
Credit: tookapic

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 dart.dev website. 

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author