Dart's M4 Release Stabilizes Core Libraries
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
- Collection (List, Set and Queue now extend Iterable directly)
- 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.
- 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.
Uwe Zdun, Rafael Capilla, Huy Tran, Olaf Zimmermann Mar 09, 2014
Olav Maassen, Liz Keogh & Chris Matts Mar 08, 2014