<div dir="ltr">When I read that first line of your post, my impression/expectation was the same as yours. <br><div class="gmail_extra">Intuitively #back and #peekBack should return the same value.</div><div class="gmail_extra">But my comments are face-value only, without a deep familiarity of streams.  Maybe someone else can provide historical & future context.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Presuming it was broadly accepted this "should" be the behaviour of #peekBack, the problem with changing its behaviour is the effect on existing users, and also cross-dialect compatability. "Ideally" Squeak/Cuis would be ammendable to such a change, and then one approach could be a little dance using an interim #peekBackFromCursor so the existing #peekBack can be deprecated for one version (to avoid silent corruption of application logic) then restoring #peekBack with the new behaviour.    A slow process, but such small changes accumulate over time to improve things.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Alternatively, we just leave #peekBack as-is and permanently introduce #peekBackFromCursor or similar.  </div><div class="gmail_extra">Maybe such changes would be superseded by XStreams anyway (not really a reason stop improving current system anyway.)<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">cheers -ben</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 21, 2017 at 9:00 PM, Jakob Reschke <span dir="ltr"><<a href="mailto:jakob.reschke@student.hpi.de" target="_blank">jakob.reschke@student.hpi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I just stumbled upon the behavior of #peekBack. I expected that it<br>
would give me a "preview" of what I would get when I send #back, but<br>
without changing the position of the Stream (like #peek does for<br>
#next). Or in other words, I expected to get the last read (or<br>
written) element.<br>
<br>
As it turned out it answers the next-to-last element instead. There<br>
even is a test case in RWBinaryOrTextStreamTest for this behavior.<br>
<br>
But does it make sense? I have my doubts mainly because of the<br>
inconsistency with the return value of #back.<br>
<br>
There is also #peekLast, which does what I expected, but it is only<br>
defined for File- and WriteStream and the comment says it is intended<br>
to get the last put element, not a last read/extracted/next-ed<br>
element.<br>
<br>
Kind regards,<br>
Jakob<br>
<br>
</blockquote></div><br></div></div>