<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> I can see the nil being returned there explicitly, so that's "where it's happening." Should this be the case though?<br>
<br>
The previous, probably original implmenetation of #peekBack used to send <br>
#oldBack to the stream.<br>
IIRC #oldBack was based on the idea that the position of a stream is an <br>
index of a sequence where #next means +1 to that index while #back means <br>
-1 to that index. Following that logic, you have to #skip: -2 and send <br>
#next to get the element -1 to position.<br>
<br>
#oldBack has been removed but the behavior of #peekBack is presumably the <br>
same as it was before. Some ancient but now external code may rely on <br>
#peekBack but it's not very likely such code would work in the current <br>
Trunk.<br>
#peekBack has no real users in the Trunk only a test remembers what it <br>
used to do.<br></blockquote><div><br></div><div>Given the above, and given that we have #next:, I ended up balancing that API with #peek:, and that again with #peekBack:.  Since they all simply return a String, possibly empty, they dodge the question about nil vs. error entirely.  </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
So, I think it's a good time to change its behavior to be based on #back.<br></blockquote><div><br></div><div><div>Without wanting to sound ungrateful for Eric's contribution (of which I look forward to more of), may we also consider the addition-by-subtraction opportunity?  I mean, it kinda makes sense that there wouldn't, and won't, be any users of #peekBack.  Maybe we should deprecate it.</div><div><br></div><div> - Chris</div></div><div> </div></div></div>