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

Re: definitions; APPEND!; etc



[Bartley:]
>>APPEND! always side-effects all but its last argument. 

[Clinger:]
>No, APPEND! should not be required to perform side effects.  This is not
>as silly as it may sound.  In an implementation using the Hewitt-Lieberman
>gc algorithm, for example, side effects to sufficiently old structures are
>likely to be more expensive than consing.  APPEND! should be free to decide
>for itself which technique is fastest.

My point of view is that APPEND! is used to ensure sharing of
structure and APPEND is used to ensure that structure is NOT shared
(except in the clearly specified case of the last argument).

>I would feel differently if APPEND! returned an unspecified value, as
>does VECTOR-SET!.

Perhaps that would be more consistent.  Perhaps we should call it
SET-LAST-CDR! instead!

Seriously, I could go either way, but I'm sure some of my code would
fail to work on a system in which APPEND! did not share structure.
Are there any others we should be discusssing?

--db--
-------