I meant to say 'indexOfSubcollection:', not 'indexOf:'.<br><br>
<div class="gmail_quote">On Sun, Mar 7, 2010 at 10:05 AM, Paolo Bonzini <span dir="ltr"><<a href="mailto:bonzini@gnu.org">bonzini@gnu.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">On 03/07/2010 03:45 PM, John O'Keefe wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">No, I'm only convinced that it different on different platforms, so it<br>is a portability issue. I'm happy with resolution in either direction (<br>
'123' startsWith: '' returns ture or false) since VA Smalltalk never<br>implemented this method, although, since I've implemented the method in<br>terms of #indexOf:<br></blockquote><br></div>... isn't this horribly inefficient, as it is at least O(m+n) rather than O(min(m,n))?
<div class="im"><br><br> I guess I prefer the current Pharo and VA Smalltalk<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">implementation since it seems more consistent., but I just think it<br>needs to be consistent if Seaside is going to use it.<br>
</blockquote><br></div>FWIW I now checked #indexOfSubCollection: in GST and it gives an out of bounds error if asked for the index of an empty collection.<br><br>I think #startsWith:/#endsWith: are substantially different from #indexOfSubCollection:, in that a limit value is clear for starting/ending with an empty string, but much less for "where is an empty string".<br>
<font color="#888888"><br>Paolo<br></font></blockquote></div><br><br clear="all"><br>-- <br>John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.<br>