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

Re: issue QUOTE-MAY-COPY, version 2

> Ok, I see you point.  The issue finally boils down to this:
>    "Is the preservation of EQLness for quoted constants so important
>     as to be the sole cause of yet another incompatibility between
>     code compiled by COMPILE-FILE and code compiled by COMPILE?"

I'm not sure about "sole cause".  There are other issues where
file compilation and EVAL/COMPILE might differ in their treatment
of constants, namely the questions of what types of objects can
appear in constants, what parts will be fasdumped, what happens
to circularities, and so forth.  I think it comes down to whether
such constants will be treated as objects (like the objects that
are bound to variables) or not, which is also a kind of consistency
issue.  Perhaps I'm wrong about the link between these issues.  Kent
seems to want file compilation to be a special case in the other
issues but not to mind QUOTE copying.  Still, they do seem linked to me.

Moreover, I'm not sure how far we'd have to extend the COMPILE-
FILE-like semantics in order to be consistent everywhere.  For
example, there seems to be some doubt about what happens to gensyms.
Could it be that something like the following might return NIL?

   (let ((a (gensym)))
     (eql (funcall (compile nil `(lambda () ',a)))
          (funcall (compile nil `(lambda () ',a)))))

Or even

   (let ((a (gensym)))
     (eval `(eql ',a ',a)))

> In short, I don't see the value of adding constraints that
>    (1) invalidate much existing practice, and

How much of existing practice involves constant copying in interpreted

-- Jeff