Actually, in this case I'd suggest that we change the standard! In each of the six Smalltalk dialects I have available (Dolphin, GemStone, Squeak, VisualAge, VisualSmalltalk, VisualWorks) the following returns true:
((ReadStream on: 'abc') peekFor: $a; next) = $b.
This makes some sense. If you get back what you expect, why ask for it again?
Is there an ANSI errata? If not, could we have a wiki page available for such? I have several things to add...
James Foster
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Ralph Johnson Sent: Wednesday, February 28, 2007 10:29 AM To: The general-purpose Squeak developers list Subject: Re: PositionnableStream>>peekFor: not standard
On 2/28/07, Damien Cassou damien.cassou@gmail.com wrote:
So, do we choose to conform to ansi or to keep compatibility ?
This is always a hard question.
Try changing it and see what breaks. If nothing breaks then it is easy to choose to confirm. If things break then at least we will have a better idea of how hard it will be to change it.
-Ralph