Subject: Re: (eq x x) => false
From: (Rob Warnock)
Date: Wed, 26 Feb 2003 03:34:22 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Ingvar Mattsson  <> wrote:
| (let ((x "Foo")
|       (y "Foo"))
|   (eq x y))
| should be allowed to return either T or NIL, since the reader is free
| to collapse multiple read constant strings to the same string.
| Of course, trying to provoke different returns in two random lisps
| (CMU CL and Clisp) managed to have CMUCL consistenly return T and
| clisp to consistently return nil.

You think *that's* fun, then try the following, entirely within CMUCL:

	> (eq '(a . b) '(a . b))

	> (progn
	    (eq '(a . b) '(a . b)))

	> (let ()
	    (eq '(a . b) '(a . b)))

	> (funcall (compile nil (lambda () (eq '(a . b) '(a . b)))))
	Compiling LAMBDA NIL: 
	Compiling Top-Level Form: 


[My understanding is that the first two use the "mini-eval" built into
the top-level, while the third uses the byte-compiler, and the last, of
course, uses the full native-code compiler.]


Rob Warnock, PP-ASEL-IA		<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607