# List operations (Was: More LPMOO stuff)

Chuck Adams (cadams@weather.brockport.edu)
Sat, 19 Aug 1995 10:13:17 PDT

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    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
    out:

    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.

    chuck
    kirlan@lambdamoo