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

Re: bug in setf documentation

in Interlisp, the thing which corresponds to SETF is "change".

(change (CAR X) mumble)  translates to

(CAR (RPLACA X mumble))

The compiler actually optimizes away the CAR in the case that the value
is not used, so this only costs if you depend on the value.

One could implement this in a different way, but having SETF or change
or whatever guarantee the value returned seems reasonable to me; if you
can't guarantee it, then make it NIL or no value.