<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On May 6, 2006, at 12:21 AM, Wolfgang Helbig wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">But the changes I'd need in this case are reaching too far. They'd include:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">- Upper bounds of integer intervals are exclusive and lower bounds inclusive</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">- Index ranges start at zero</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">- The positions of Positionable Streams would take the same values as</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica"><SPAN class="Apple-converted-space">  </SPAN>the indexed variables of their underlying collections.</FONT></P> </BLOCKQUOTE></DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">So the changes *are* important.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">And hard to implement in Smalltalk.</DIV></BLOCKQUOTE><BR><DIV>Really?? I think I could implement this api in a few minutes.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Instead of 1 to: 5 do: [:n|...]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>you use method</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>1 upTo: 5 do: [:n | ... ]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>which is trivially implemented on Number as </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>upTo: n do: aBlock</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>^self to: (n-1) do: aBlock</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>etc.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>For collections, provide an offset wrapper that implements SequenceableCollection's interface, but shifts indices by the offset.  </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Done.  You don't have to change all of Smalltalk to get what you want (and most of us would prefer you not change the code we are using, thanks).  You can certainly extend it to get the api you want.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>