PositionableStream>>isEmpty
Benoit St-Jean
lamneth at aei.ca
Fri Jul 10 11:14:09 UTC 1998
At 13:11 98-07-09 -0400, you wrote:
>'From Squeak 2.1 of June 30, 1998 on 9 July 1998 at 1:05:33 pm'!
>
>!PositionableStream methodsFor: 'testing'!
>isEmpty
> "Answer whether the receiver's contents has no elements."
>
> ^position = 0! !
>
>Wouldn't it be better as
>
> ^readLimit = 0
Smalltalk-80 says so (Should answer whether the receiver's contents
has no elements) but in all Smalltalk, #isEmpty returns
true if the stream is at the beginning. As Pugh and Lalonde
once said, #isEmpty should have been called #atBeginning
____________________________________________________________________________
Benoit St-Jean Creative Technologies International
871-8585 #234 1440 Ste-Catherine ouest, Bureau 400
email : lamneth at aei.ca Montreal, Quebec, Canada, H3C 3R7
The opinions expressed in this message are my own personal views and do not
reflect the official views of CTI
More information about the Squeak-dev
mailing list
|