[Seaside-dev] Re: [Seaside Issues] Issue 555 in seaside: SequenceableCollection>>#beginsWith: and #endsWith: are non-portable

John O'Keefe wembley.instantiations at gmail.com
Sun Mar 7 16:24:28 UTC 2010


I meant to say 'indexOfSubcollection:', not 'indexOf:'.

On Sun, Mar 7, 2010 at 10:05 AM, Paolo Bonzini <bonzini at gnu.org> wrote:

> On 03/07/2010 03:45 PM, John O'Keefe wrote:
>
>> No, I'm only convinced that it different on different platforms, so it
>> is a portability issue.  I'm happy with resolution in either direction (
>> '123' startsWith: '' returns ture or false) since VA Smalltalk never
>> implemented this method, although, since I've implemented the method in
>> terms of #indexOf:
>>
>
> ... isn't this horribly inefficient, as it is at least O(m+n) rather than
> O(min(m,n))?
>
>
>  I guess I prefer the current Pharo and VA Smalltalk
>
>> implementation since it seems more consistent., but I just think it
>> needs to be consistent if Seaside is going to use it.
>>
>
> FWIW I now checked #indexOfSubCollection: in GST and it gives an out of
> bounds error if asked for the index of an empty collection.
>
> 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".
>
> Paolo
>



-- 
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20100307/1b515ea1/attachment.htm


More information about the seaside-dev mailing list