[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: QUOTE-SEMANTICS, or QUOTE-MAY-COPY (Version 4)
- To: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>, Sandra J Loosemore <email@example.com>, Jon L White <firstname.lastname@example.org>, Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>, Cris Perdue <cperdue@Sun.COM>
- Subject: Issue: QUOTE-SEMANTICS, or QUOTE-MAY-COPY (Version 4)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Fri, 27 Jan 89 20:16 EST
- Cc: CL-Compiler@SAIL.STANFORD.EDU, Common-Lisp-Implementors@STONY-BROOK.SCRC.Symbolics.COM
- In-reply-to: <19890125031059.3.MOON@EUPHRATES.SCRC.Symbolics.COM>, <8901250447.AA20141@defun.utah.edu>, <8901251310.AA08200@bhopal>, <890125121120.8.KMP@BOBOLINK.SCRC.Symbolics.COM>, <8901251757.AA24301@clam.sun.com>, <8901271041.AA17581@bhopal>
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.
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.