Yes, in this case, change ANSI.
And also have all the Smalltalk implementations add a comment to the #peekFor: method stating the Smalltalk community has decided the standard is wrong, and in conflict with established practice.
--Alan
<Nicolas Cellier> James Foster a écrit :
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
Totally agree, change ANSI </Nicolas Cellier>