If people really want to be able to combine enumerator methods for higher efficiently the Collection hierarchy should be fixed.
Paolo why this would be faster?
Having external iterator objects like in C++ and Java is not that bad after all:
result := aCollection iterator select: [ :e | ... ]; collect: [ :e | ... ]; contents
It's already there and it's called #readStream. :-) It only lacks #size.
Not in Pharo, but it lacks all iteration methods.
See http://code.google.com/p/pharo/issues/detail?id=958 for an outline of the implementation.
That would be a welcome addition to Pharo.
Having an iterator class also avoids having to implement all these iteration methods over and over again, e.g. in visitors.
lukas do you have an example because I do not see why Also with traits you just have to implement do: and you get all the other one for free.
Is this going to be ANSI?
DNU? why ANSI has to be in the story?
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project