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

Issue ADJUST-ARRAY-DISPLACEMENT (Version 3)



    Rather than wait for some resolution of Kent's question about the
    omission of the :DISPLACED-TO argument, I took the liberty of guessing
    that adjusting a displaced-to array without setting the :displaced-to
    meant that the result was displaced to the same place. I inserted rule 3
    and renumbered the rules.

The manual is pretty vague in this area, but my reading of
ADJUST-ARRAY (which says that the :DISPLACED-TO argument is the same as
in MAKE-ARRAY) is that if no :DISPLACED-TO argument is supplied, the
resulting array is never displaced, even if it had been originally.
That's what we implemented in Spice Lisp, and that's the interpretation
that seems to be consistent with the rest of this proposal (e.g. the rule
that if :DISPLACED-INDEX-ARG is not supplied, it defaults to zero rather
than the old index).

So I support the earlier version of the proposal, with the added
clarification that if no :DISPLACED-TO argument is supplied in a call to
ADJUST-ARRAY, the resulting array is not displaced, even if the original
array had been displaced.  That is clear, simple, and sufficient in my
view.

It might be argued that a displaced array should remain displaced unless
the user specifically specifies otherwise.  I can imagine some
modularity arguments for such a view, though I don't think they are
compelling.  If someone strongly prefers this interpretation, I wouldn't
object and would even arrange to fix the CMU code so that we can still
say that public-domain code is available.  However, this change will
surprise some people and it should be clearly stated, not hidden in a
parenthetical statement in point 3.  Also, we should probably go over
the whole proposal to make it consistent with this change.

-- Scott