Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Wednesday, January 30, 2013
Breaking Change: Iterable.mappedBy is now Iterable.map, List.skip/take return Iterables
mappedBy(), we hardly knew ye!! Florian Loitsch tells us the reasonfor the name change to map():
We are reverting the name-change to 'map'. I got a lot of feedback, and the name is clearly not working for most of you. We are therefore reverting back to "map".
In order to avoid mistakes we will also make the return-type (and dynamic type) of List.map be an Iterable, and not a List. This will, hopefully, make it more clear that the result is a lazy wrapper instead of an eager evaluation.
For consistency we changed the return-type of List.skip and List.take to be an Iterable too.
We are going to keep the mappedBy method in the implementation (next to "map") for several weeks, so you have the time to migrate. The List.skip/take methods will furthermore continue to return Lists (even though their return type is "Iterable").
When we finish the transition "mappedBy" will go away, and skip/take will return Iterables (dynamic type) and not Lists anymore.
A patch for this change has already been uploaded, and will be committed soon (probably tomorrow):