Alessio Stalla alessiostalla@gmail.com writes:
Why wrong? Literal coalescing is optional behaviour as far as I remember.
Literal coalescing is this: (cons '(1 2 3) '(1 2 3)) those two different '(1 2 3) constant objects can be coalesced to a single object at the discretion of the compiler (only in file compilation, iirc).
However, Erik talked about cases when the same literal object is present more than once in the source, like in:
(let ((foo '(1 2 3))) (compile nil `(lambda () (eq ',foo ',foo))))
Clearly, in the second case the equality of the constant object must be preserved.
Yes, that is true for COMPILE and EVAL.
-T.