Levente you should realize that these methods have been defined and used more than a couple of years ago. They are used by a cool group of programmer and the infrastructure of Moose since also a couple of years so I would not call them useless misleading but thanks for you analysis :) It is time to rewrite them. But flatCollect: and flatCollectAsSet: names are more important than their implementation.
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
Yes I do not really like it
#flatCollect: -> #gather:
the problem is that gather: does not convey its intention. flatCollect: is much much better.
#flatCollectAsSet: -> #gather: + #asSet
Is it not faster?
#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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project