[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.

Per Bothner <per@xxxxxxxxxxx> writes:
> Of your (David's) 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).

Fair enough. I initially disliked it, too, but I have grown used to it
through quite a bit of personal code that makes similiar changes for
mutating operators.

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

Yep, but it actually adds value, I think. Sooner or later
people are going to want slicing; having the index-object present
helps pave the way for that.

david rush
Life's but a walking shadow; a poor player
That struts and frets his hour upon the stage,
And then is heard no more: it is a tale
Told by an idiot, full of sound and fury,
Signifying nothing. -- Macbeth Act 5, scene 5