+100 On 04 Dec 2011, at 00:07, Igor Stasenko wrote:
> On 3 December 2011 01:30, Stéphane Ducasse <[email protected]> wrote: >> We will have to track when this error was introduced may be this is the >> runtimeError fix that we pushed. >> We should check on images to spot this regression. >> >> Now printing the contents of a stream by default looks to me a bad idea. >> May be when the stream is positionable it makes sense but why would I force >> to read the complete contents of a stream >> when I open an inspector on it. >> >> > > I think that 'contents' concept in streams are controversial. > Just consider: > - a stream which generates random numbers. every time you send #next, > you get another random number. what is a contents of such stream? > all random numbers it can generate till universe die? > > - a real-time stream broadcasting video/audio. what is a contents of > such stream? > you cannot capture whole contents of it, because these kinds of > streams has no 'end'. > > It is because streams are for processing data in portions, and when > you requesting contents of it, you turning it into collection. > > Here the Collection class comment: > " > I am the abstract superclass of all classes that represent a group of > elements. > " > > And Stream: > " > I am an abstract class that represents an accessor for a sequence of > objects. This sequence is referred to as my "contents". > " > Yes. Of course, abstractly speaking, all streams containing something > , but you can access it only by portions. > Otherwise they will be no different to collections and therefore we > won't need them. > > -- > Best regards, > Igor Stasenko. >
