Dec. 23, 2009
5:27 p.m.
What bugs me is that #sortBy: does not what it says. I would expect that
aCollection sortBy: [ :each | each name ]
does the same as
aCollection sort: [ :a :b | a name <= b name ]
if you want that, I can provide a fast implementation of #sortBy:
Not all collections are sortable and #sort: is sorting in-place, so it's hardly doable.
But it would be nice to have sort: and sortBlock: polymorph. Because right now we cannot have OrderedCollection and Array or SortedCollection interchanged. Stef