BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Dart's M4 Release Stabilizes Core Libraries

Dart's M4 Release Stabilizes Core Libraries

This item in japanese

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
Style

BT