I agree with you. Nevertheless it seems that there is a bug in the debugger.

> In a workspace, type this and debug it:
>   Stream basicNew printString.
> 
> Step over basicNBew.
> Step into printString.
> Step into printStringLimitedTo: 50000
> Step into streamContents: [:s | self printOn: s] limitedTo: limit
> Step over 100 min: sizeLimit
> Step over self new: (100 min: sizeLimit)
> --> error: the debugger tries to execute (String new: String)
> 
> I also note that all class methods in stack window left column are
> miss-printed - like 'Block in class)'    new:

Stef



On Dec 4, 2011, at 12:07 AM, 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.
> 


Reply via email to