ok, i understood, Discussing with Marcus we believe that it would be better to keep Collecition>>gather: and add Collection>>flatCollect: (with the same implementation) and put a comment in gather: saying that is kept for compatibility purposes. flatCollect: will be included in Pharo and will be removed from CollectionExtensions. 2013/6/12 Frank Shearar <frank.shearar@gmail.com>
On 12 June 2013 10:54, Frank Shearar <frank.shearar@gmail.com> wrote:
#gather: directly applies the stream fusion technique as its implementation, so is faster than the current implementation of #flatCollect:
Stef's saying "why not move #gather:'s implemenation to #flatCollect:, and make the old #gather: call the new #flatCollect:"
Er, and that would mean moving #flatCollect: out of CollectionsExtensions into the base image.
frank
On 12 June 2013 10:33, Sebastian Tleye <stleye@gmail.com> wrote:
As far as i know the implementation of gather: is faster than the implementation of flatCollect:
2013/6/12 Stéphane Ducasse <stephane.ducasse@inria.fr>
Why not the inverse. They are much more users of flatCollect: then gather:
and again gather: sucks. It does not convey that this is a mapcan ie happening the results of each iteration into the
So flatCollect: is 10 times more explicit and better. you flatten the results of the collect:
Stef
I think the simplest solution is to keep both and that flatCollect directly call gather:
If you agree with that, I will correct the moose extension package
2013/6/11 Stéphane Ducasse <stephane.ducasse@inria.fr>
gather: sucks as a name. flatCollect: is much better so do not remove it.
On Jun 11, 2013, at 4:53 PM, Sebastian Tleye <stleye@gmail.com>
wrote:
If they are not different so a better way would be replace #flatenCollect: by #gather: but anyway, moose people should decide and commit the change since i
am
not a moose developer.
2013/6/11 Marcus Denker <marcus.denker@inria.fr>
On Jun 11, 2013, at 4:24 PM, Frank Shearar <frank.shearar@gmail.com> wrote:
On 11 June 2013 14:18, Sebastian Tleye <stleye@gmail.com> wrote:
Hello,
Fixing some bugs in Traits we realized that it would be good idea
to
use CollectionsExtensions package (it has some useful functions), also it would be great to include CollectionsExtensions in Pharo 3.0.
Is this the HPI library? I seem to recall TraitClasses [1] using it.
CollectionExtension is from Moose.
the Trait based Stream refactoring was done some years ago but has not been used or maintained.
Marcus
-- Guillaume Larcheveque