Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at  https://medium.com/dartlang .

Dart 1.9: The release you’ve been await-ing for

Asynchronous programming is everywhere – user interaction, network access, file I/O. Dart simplifies and enhances these scenarios with the 1.9 release.

Today’s release introduces async methods and await expressions built on top of our existing Future API. You can now use familiar control flow features – for/while loops, if blocks, and try/catch – to manage complex asynchronous interactions. These new features are explained thoroughly the Dart Language Asynchrony Support: Phase 1 article.

Before

Dart’s Future API makes it easier to compose asynchronous operations, but handling conditional cases and errors can still be difficult.

After

async and await make implementing the same functionality straightforward.

We are also introducing generator methods – sync* and async* – that make it easy to lazily generate sequences, eliminating almost all cases where developers need to create custom iterators or manually manage stream creation. For more information, read the Asynchrony Support: Phase 2 article.

For a high-level overview of all of these new features, take a look at the Asynchrony section of the Dart Language Tour.

In addition to async, Dart 1.9 includes a number of other enhancements.

  • enum, a long-requested feature, is now fully supported.
  • The Dart Analyzer has moved to the Dart Analysis Server. This makes it much easier to integrate Dart source analysis into IDE’s beyond the Dart Editor (for instance, IntelliJ and Sublime).
  • We've updated the regular expression engine for the Dart VM. It's up to 150x faster than the previous implementation.
  • The Isolate API has now been fully implemented in the Dart VM, making it much easier to create applications that target multiple CPUs.

For a full list of the changes in this release, take a look at the release notes.

Visit the Dart download page to get started with Dart 1.9. Check out the Dart support page for information on getting help, filing issues, and contributing to the project.