I think that collectAsSet: is used a lot because we convert collection and remove duplicates. So it won’t be the same with select: . But I prefer to use #removeDuplicates, because this explicitly says: I want to remove duplicates, and not use a side effects of Set. Anyway have a nice day guys, we are building an amazing system.
Cheers! Uko On 10 Dec 2013, at 14:38, Nicolas Cellier <nicolas.cellier.aka.n...@gmail.com> wrote: > And then rejectAsSet: selectAsHeap: etc... > A big -1 > > > 2013/12/10 Yuriy Tymchuk <yuriy.tymc...@me.com> > > On 10 Dec 2013, at 14:26, Roberto Minelli <roberto.mine...@usi.ch> wrote: > > > No. Since #flatCollectAsSet: is in the image, #collectAsSet: should be in > > the image as well. > > > > And then, since we want clean code #collectAsSet: is cleaner than > > #collect:as:. > > Yes, but this also means that you need to implement: > > collectAsArray: > collectAsOrderedCollection: > collectAsBag: > … > > :) > > > > > On Dec 10, 2013, at 2:23 PM, Esteban Lorenzano <esteba...@gmail.com> wrote: > > > >> I don't think it has to be in the image, > >> > >> After all, you can just replace your calls for #collect:as: > >> > >> Esteban > >> > >> > >> > >> > >> On Tue, Dec 10, 2013 at 2:21 PM, Roberto Minelli <roberto.mine...@usi.ch> > >> wrote: > >> Hi, > >> > >> In Pharo 3 you guys integrated Doru’s CollectionsExtension package, which > >> is great. > >> > >> You forgot, however, to integrate the utility method #collectAsSet: I was > >> using in several places in my code. > >> > >> It should be simply > >> ^ self collect: aBlock as: Set > >> > >> Could someone please put this in the standard image please? Thanks. > >> > >> Cheers, > >> R > >> > > > > > > >