bob coyne said:
>
> In porting some code from Lispworks to Cmucl, I encountered
> the following.  It seems that when there's a quoted list
> in compiled code that EQUAL sublists are made EQ to each other.
> I don't know if this would be considered a bug or a feature, but
> it seems a bit non-intuitive.

The file compiler is explicitly allowed to do this, see the relevant ANSI
CL section in the CLHS. Until fairly recently, we also did this
(coalescing of literals) in COMPILE, and that is explicitly forbidden in
the standard, IIRC, so this was fixed.  Hence the behaviour of the file
compiler and COMPILE differ w.r.t. this.

Generally speaking, if you want fresh structure, you should use list, not
quote.  Other implementations do the same. They are also allowed to put
quoted literals in read-only space, BTW.

Regs, Pierre.

-- 
Pierre R. Mai <[EMAIL PROTECTED]>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein


Reply via email to