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

Comments on Array Summary.

After reading Ron's summary, here are my comments:

Case 1.

Case 2.
I'm not sure I agree that copying the elements when undisplacing
an array is correct.  Hey, if the user doesn't want to have one
array look at the same elements as another, then it shouldn't,
either by sharing or copying.  You want to copy an array, then
copy it explicitly.  Of course, we don't have COPY-ARRAY, but I'd
sure hate to see people copy arrays by displacing to them and then
undisplacing!  Blech.

I'd be perfectly happy if it was an error to undisplace an array;
if not, then it shouldn't copy and we should require an :INITIAL-ELEMENT

Case 3.
I presume :INITIAL-ELEMENT or :INITIAL-CONTENTS is allowed in this
case to reinitialize the array?

Case 4.
I presume here that you mean "copy if necessary"?  In particular, if
the new linear size is smaller than the old, many implementations
can just change the array dimensions and not touch the data itself.
Of course, doing so may prevent lots of data from ever being GCed.


Just exactly what does :ELEMENT-TYPE do in each situation?

Just exactly what happens to a fill pointer in each situation?