On 6/5/20 4:19 PM, João Távora wrote:
> I totally agree it is
> undefined behaviour to change structure of literals (quoted or
> self-evaluating objects), also in Common Lisp, because compilers are
> probably allowed to reuse parts of the internal structure of such
> objects. But that's a far cry from having two different manifestations
> of `equal` such objects _be_ the same object, but only for compiled
> code.
I don't understand this remark, as the idea that "compilers are allowed to reuse
parts" necessarily implies that (eq "a" "a") can be t if the compiler decides to
reuse the string.
Depending on the implementation of sequences, it could reuse only the
later parts of the sequences to maintain uniqueness and still have
Certainly in Common Lisp (eq "Foo" "Foo") might be true or
false (this specific example is called out in CLtL 6.3).
I stand corrected. I was simply mistaken :-)
João