What’s Next

Completers and futures are everywhere in Dart, mostly thanks to streams. They also help out wonderfully when our asynchronous needs grow to the point that separate isolates of code are needed. It is wonderful to know that we do not have to reinvent them or choose the best library available when we need them.

Recent versions of JavaScript include the concept of web workers, but if we need to support older browsers, we are left to our own devices. Early versions of Node.js supported promises, which are quite similar to Futures in Dart. In the end, they were removed from Node.js, leaving the poor hipster to reinvent promises each time the need arises.

Thankfully, in Dart, web workers and promises are supported from the outset in the ...

Get Dart 1 for Everyone now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.