[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comments on Array Summary.
It seems that we need a judgement call on whether to copy arrays when
they are undisplaced.
In all cases but #1 you could specify :initial-contents or
:initial-element. Case #1 supposes that :displaced-to was specified.
Case #4. You're right, one could choose to not copy the block when the
array was shrinking. I believe this is what the Spice CommonLisp code
:element-type seemed pretty clear. It is treated as an error test,
signalling if the array cannot hold elements of that type.
Regarding fill pointers: the case that seems ambiguous is vector-pop.
It signals an error if the fill pointer is zero, and only then. If a
vector is shrunk to a size smaller than where the fill pointer points,
what do we do? vector-push and vector-push-extend seem clear about what
to do, return nil or enlarge the vector.