MOO-cows Mailing List Archive


Re: List operations (Was: More LPMOO stuff)

Ben Jackson drew these hieroglyphs:
> > Hence list[n..] would be equivalent to list[n..length(list)], except it
> > should save the extra time of evaluating length(list).
> It would save you the extra time of *typing* length(list).  The length
> will still have to be evaluated.  In either case it's O(1), since list[0]
> contains the length (it's inaccessible from MOOcode).  I don't think you
> can argue that this would be a performance improvement.

well, it'd shave off a few steps, not having to deal with an explicit
builtin call, but that already got covered.  just want get my opinion

the syntax kind of bugs me.  i can see where it comes from, but it
does look like a typo.  my preference would be for foo[1..$] as is
specified in the "to-do" list for the LamdaMOO server.


Home | Subject Index | Thread Index