[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Comments on Array Summary.
- To: common-lisp@su-ai
- Subject: Comments on Array Summary.
- From: greek@DEC-HUDSON
- Date: Thu, 27 Jun 85 09:52:56 EDT
After reading Ron's summary, here are my comments:
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
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
or :INITIAL-CONTENTS option.
I presume :INITIAL-ELEMENT or :INITIAL-CONTENTS is allowed in this
case to reinitialize the array?
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.
Again, I presume :INITIAL-ELEMENT or :INITIAL-CONTENTS are OK.
Just exactly what does :ELEMENT-TYPE do in each situation?
Just exactly what happens to a fill pointer in each situation?