Sample implementation Lars Thomas Hansen (17 Jan 2000 14:27 UTC)
Re: Sample implementation Matthias Felleisen (17 Jan 2000 14:39 UTC)
Re: Sample implementation Per Bothner (17 Jan 2000 19:44 UTC)
Re: Sample implementation Lars Thomas Hansen (17 Jan 2000 20:53 UTC)
a meta-comment Per Bothner (17 Jan 2000 20:00 UTC)
Re: a meta-comment Lars Thomas Hansen (17 Jan 2000 21:14 UTC)

Re: a meta-comment Lars Thomas Hansen 17 Jan 2000 21:14 UTC

>First, does anyone want to speak up on Alternative 1 vs Alternative 2?
>My current inclination is Alternative 1, and unless there is ground-swell
>of support for Alternative 2, the final SRFI will use Alternative 1.

I am in favor of Alternative 1.  It is symmetric with what we already
have, and for SET-CAR!, VECTOR-SET!, and so on, Alt.1 is clearly most
reasonable.

For things like ARRAY-SET! (see eg Alan Bawden's code in SLIB) Alt.2
seems more reasonable because ARRAY-SET! takes a variable number of
arguments, and, as the proposal already states, it's a little messy,
both to code and performance-wise, to take the value as the last
argument.  However, using constructions like CASE-LAMBDA it becomes much
less messy (at least performance-wise) to write setters that take the
value as the last argument, which I think is a point in favor of Alt.1.

As it happens, _neither_ alternative is right for ARRAY-SET! as the
latter is written now, because it takes array first, then value, then
subscripts.  I.e., (set! (setter array-ref) array-set!) won't work with
either alternative.  That situation will probably be common when it is
"natural" to put the value before subscript-type expressions but after
the object being assigned to.

--lars