Dart's M4 Release Stabilizes Core Libraries

| by Zef Hemel Follow 0 Followers on Apr 17, 2013. Estimated reading time: 1 minute |

The Google Dart team has released milestone 4 of its Dart SDK. While the language had already stabilized in previous milestones, this M4 release stabilizes some core libraries, specifically: dart:core, dart:collection and dart:async. Performance has also improved. The DartVM, which runs Dart natively, is now between 160% (for the DeltaBlue benchmark) and 200% (for the Richards benchmark) faster than v8, the JavaScript engine that powers Chrome. The release also includes the faster dart2js compiler that we reported on before.

A summary of the API changes in this release:

  • The separator argument in Iterable.join defaults to "" (instead of null).
  • All DateTime constants are non-abbreviated. Also changed DAYS_IN_WEEK to DAYS_PER_WEEK.
  • Removed deprecated classes and methods
    • CollectionSink
    • Stream.pipeInto
    • Iterable/Stream.max/min
    • Collection (List, Set and Queue now extend Iterable directly)
    • Datetime.</<=/>/>=
    • IOSink.writeStream (renamed to IOSink.addStream)
    • IOSink.writeBytes (renamed to IOSink.add)
    • StreamSink (renamed to EventSink)
  • Iterable.reduce/Stream.reduce introduced that does not require an initial value.
  • List range functions were refactored:
    • List.getRange takes an endIndex argument and returns an Iterable.
    • List.setRange takes an endIndex and an iterable (plus an optional skipCount).
    • List.removeRange takes an endIndex.
    • List.insertRange got removed.
    • List.replaceRange was added.
    • List.fillRange was added.
    • List.setAll was added. (not strictly speaking a range function).
  • Stream.hasSubscribers renamed to Stream.hasListener
  • Removed async:EventSinkView.
  • Removed the AsyncError class.
  • Removed StreamController.broadcast.
  • dart:html has had most Web Worker related APIs removed while the correct API is worked out. The Worker class remains for spawning Javascript workers
  • Renamed InvocationMirror to Invocation
  • Function.apply uses Symbol for named arguments
  • dart:mirror now uses Symbol instead of String to represent names

Frequently changing APIs is one of the challenges of developing with Dart today, requiring users to keep a close eye on the mailing list for breaking changes. As the team aims for a summer 1.0 release, it will continue to add breaking changes while it still can, once 1.0 is hit, APIs will change less often. The number of these changes is expected to decrease as summer draws closer.

The Dart SDK M4 release can be downloaded from the Dart website and is available for Windows, Linux and Mac.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread


Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you