2010/8/24 Schwab,Wilhelm K <bschwab@anest.ufl.edu>:
This cropped up in Dolphin some years back. Â IIRC, OA's answer was that streams historically worked on only Array and maybe something else. Â Having said that, they relaxed a constraint because it was harmless and a good idea.
I'm not sure about streaming over a set; lack of order means that it might be tricky to maintain a reasonable position??
Exactly, the Stream would hardly be positionable, unless you use a sort of OrderedSet... A ReadWriteStream would be problematic for the same reasons. What would be the interest of such a Stream ? (I mean something more than what just you can do with #do:or #add:) Nicolas
________________________________________ From: pharo-project-bounces@lists.gforge.inria.fr [pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Stéphane Ducasse [stephane.ducasse@inria.fr] Sent: Tuesday, August 24, 2010 7:18 AM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] Why is readStream on SequenceableCollection and   not on Collection?
did you try with nile? because I forgot (of course doing too many things) but the difference between squeak and VW was that we could not have a stream on something else than string and array. Now this may have  changed in squeak with the work of levente or nicolas. Stef
On Aug 24, 2010, at 1:11 PM, Bart Gauquie wrote:
Dear list,
is there a specific reason readStream is defined on SequenceableCollection and not on Collection?
I want to for instance stream over a Set (in a non determined order).
I tried to do readStream on a Set, but got an error that copyFrom:to: was not defined on Set; so:
ReadStream>>on: aCollection
I think should read:
ReadStream>>on: aSequenceableCollection
Or should I always use: collect: select: detect: protocols?
Any thoughts on this?
Kind Regards
Bart
-- imagination is more important than knowledge - Albert Einstein Logic will get you from A to B. Imagination will take you everywhere - Albert Einstein Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. - Albert Einstein The true sign of intelligence is not knowledge but imagination. - Albert Einstein However beautiful the strategy, you should occasionally look at the results. - Sir Winston Churchill It's not enough that we do our best; sometimes we have to do what's required. - Sir Winston Churchill _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project