[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Common-Lisp@SU-AI.ARPA
- Subject: ADJUST-ARRAY
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Thu, 16 Oct 86 00:40 EDT
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.
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>