On Sun, 27 Dec 2009, Stéphane Ducasse wrote:
hihere are the collection extensions we use in Moose. I copied them to PharoTaskForces so that we can discuss and tweak the code if wanted.
I just checked these and most of them are useless misleading or duplicate, like:
Collection >> #collectAsSet: -> #collect:as: (ok, it's new in pharo) #equalsTo: misleading name, #containsSameElementsAs: would be better IMO #(1 1 2) equalsTo: #(2 1 1) ===> true #flatCollect: -> #gather: #flatCollectAsSet: -> #gather: + #asSet #flatten -- misleading name, since it doesn't change the object, but returns a new array and it's only flattening one level which is what #gather: does. Tthere's a proper #flattened implementation in squeak treated inbox if you're interested. (guess why it's not in the trunk) #groupBy: -> #groupBy:having: #sum: -> #detectSum: Symbol >> #value (same as super) SequenceableCollection >> #shuffle -> #shuffled OrderedCollection >> #removeAtIndex: -> #removeAt: (-> means that the extension on the left is the same as or worse than the already existing method(s) on the right) I guess you should shrink this package. :) Levente
_______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
