[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Access time of elements Re: Bad things []

This page is part of the web mail archives of SRFI 25 from before July 7th, 2015. The new archives for SRFI 25 contain all messages, not just those from before July 7th, 2015.

David Rush wrote:

Per Bothner <per@xxxxxxxxxxx> writes:

A modest but not order-or-magnitude difference on a non-optimizing
implementation is not does not IMO justify a less natural api.
   --Per Bothner

I would contend that is it a *more* natural API. I find it just as
annoying as the compiler finds it inefficient to scan past an unknown
number of arguments to find something that should *always* be there.

Of your two suggestions:

    1 (array-set! a val dim0 dim1 ... dimn)
    2 (array-set! a (array-index dim0 dim1 ... dimn) val)

I can see some appeal in (2), but I do dislike (1).

The main problem with (2) is that it adds a new concept - an
"index object" data-type.

	--Per Bothner