On Wed, 01 Aug 2007 17:22:34 +0200, Ron Teitelbaum wrote:
Klaus,
I was just reading Damien's new code and even though the current
implementation does position correctly it returns the wrong value.
Damien's
code returns the proper back value and replaces #next with #peek, to
leave
the position in the right place.
It's a good change. Not sure I support leaving #oldBack for long though.
There doesn't appear to be much use of getting a returned result 2
positions
back from a call to oldBack.
Ron, the invariant I wrote does not care about the return value. If
Damien's change keeps that behavior (indeed I'm convinced that Damien will
do so) then chances are that nobody really used the mistaken return value.
The users of #back in 3.9/10 and 3.8 do discard the value, AFAICT.
I agree with you, remove #oldBack. Whoever would change his code to use
make use of #oldBack, can equally well put in the correct use.
/Klaus
Ron Teitelbaum
-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:v3dot10-
[EMAIL PROTECTED]
On Behalf Of Klaus D. Witzel
Hi Damien,
an actual user of #back is #asSignedInteger, from which I derived the
following invariant:
aStream position == (aStream next; back; position)
So #back can't be that wrong, no?
/Klaus
From: "Damien Cassou"
Newsgroups: gmane.comp.lang.smalltalk.squeak.v3dot10
Subject: 0006583: PositionableStream>>back behavior is totally wrong
Date: Wed, 01 Aug 2007 16:47:27 +0200
URL:
news://<[EMAIL PROTECTED]>
http://bugs.squeak.org/view.php?id=6583
_______________________________________________
V3dot10 mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/v3dot10
_______________________________________________
V3dot10 mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/v3dot10