[BUG] ReadStream>>isEmpty ?

Roel Wuyts wuyts at iam.unibe.ch
Fri Aug 8 20:06:44 UTC 2003


I *think* there was a huge thread over this issue (#isEmpty) a while 
ago (around a year, I think, but times go fast :-) ). I remember lots 
of heated discussion... You might want to check it out in the archives.

On Friday, Aug 8, 2003, at 20:06 Europe/Zurich, Ken Causey wrote:

> Well, I nearly threw up at the site of ReadStream>>on:from:to: .  Maybe
> my instincts are simply tuned wrongly.  I'll think I'll leave well
> enough alone for now.
>
> Ken
>
> On Fri, 2003-08-08 at 12:44, Andreas Raab wrote:
>>> As a followup, redefining PositionableStream>>isEmpty to collection
>>> isEmpty breaks quite a few things including the use of
>>> backspace in most text panes and selecting from the stack list
>>> in the debugger.
>>
>> Not surprising. Consider this test:
>>
>> testReadStreamEmpty
>> 	| rs |
>> 	rs := ReadStream on: #(1 2 3) from: 0 to: 0.
>> 	self assert: (rs isEmpty).
>> 	self assert: (rs next isNil).
>>
>> The collection isn't really what you want to look at.
>>
>> I recommend you write down your expectations in the form of tests 
>> first
>> (like in the above) and go from there.
>>
>> Cheers,
>>   - Andreas
>>
> <signature.asc>
>
Roel Wuyts                                                   Software 
Composition Group
roel.wuyts at iam.unibe.ch                       University of Bern, 
Switzerland
http://www.iam.unibe.ch/~wuyts/
Board Member of the European Smalltalk User Group: www.esug.org



More information about the Squeak-dev mailing list