[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fill-pointers and adjust-array
Does anyone have a clear idea (page 297 CLtL) of what is supposed
to happen to the fill-pointer (this assumes the array is a vector)
when none is specified in the argument list to ADJUST-ARRAY?
I could imagine:
(1) Reset it to the new length of the array.
(2) Reset it to 0.
(3) Reset it to the minimum of the new length and the current value.
(4) Not changing it.
I am somewhat uncomfortable with it changing and would prefer
something in the spec which reads:
The :fill-pointer argument defaults to the current value of
the vector's fill-pointer. If the fill-pointer is out of bounds
after any adjustment, an error should be signaled.
With this there would be no fuzziness about the fill-pointer changing
magically and it would be well defined in the same way it is in the
other places where fill-pointers have special meaning.
p.s. Sorry if this has been answered sometime in the past.