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

ADJUST-ARRAY



CLtL (p297) says that it is "not permitted to call ADJUST-ARRAY on an
array that was not created with the :ADJUSTABLE option." This strikes me
as overly restrictive. Why don't we say that ADJUST-ARRAY always returns
an adjusted array and that the argument array will be modified only if
(ADJUSTABLE-ARRAY-P array) was true. This is no more unreasonable than
the current specification for the DELETE function. The way to be sure you
were going to win would be to say:

    (SETQ X (ADJUST-ARRAY X ...))

just as you would do

    (SETQ X (DELETE ... X))

and in special cases you would know that you didn't have to do the SETQ.
Does anyone really feel strongly that erring is necessary here? 

I have an application where this comes up and as nearly as I can tell,
I must now go and simulate the effect of ADJUST-ARRAY in order to create
an array to a new size and make sure it gets filled properly. It makes me
sad that I should have to do this when there's a function already that 
comes so close to what I want.