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

Issue: QUOTE-SEMANTICS, or QUOTE-MAY-COPY (Version 4)



If I may summarize what I see as the key points in this discussion:

No one wants EVAL and COMPILE to be specified to be different in this
respect (i.e. drop QUOTE-MAY-COPY:NOT-EVAL).

The output of LOAD-TIME-EVAL is not subject to copying.

The point of controversy is whether we allow a copy of some sort to be
done between the time a list structure is made into a function (or
passed as a form to EVAL) and the time of completion of the first
evaluation of a (quoted or self-evaluating) constant in the function (or
form).  Side-effects on these objects are not allowed, so the issue is
only identity under EQL.  A clean language would not allow such copying,
but copying can be desirable for implementation reasons in some
implementations and is already done in much current practice.

There should be no restriction on the data types or circularity of
objects used as constants outside of COMPILE-FILE.  If copying is
allowed it happens only for objects that the implementation is capable
of copying without signalling an error or doing anything undefined, and
without violating "similarity as constants within a single Lisp", a
concept to be defined by CONSTANT-COMPILABLE-TYPES.

I would vote either for a proposal to forbid copying, or for a
proposal to allow it within the above restrictions.

Two observations:

The "similarity as constants within a single Lisp" rule means that
instances of user-defined STANDARD-CLASS or STRUCTURE-CLASS types
are never copied.  This removes my largest objection to copying.

(LOAD-TIME-VALUE (QUOTE <foo>)) is not a way to prevent <foo>
 from being copied; the output from LOAD-TIME-VALUE is not copied,
but the input might be.