[Openmcl-devel] (equal '#:G34159 '#:G34159) -> NIL
j.aeschliman at gmail.com
Wed Aug 1 14:32:07 CDT 2012
this may help:
(defun compare (x y)
(list x y (eq x y) (equal x y) (equalp x y)))
(let* ((x (gensym))
(y (read-from-string (prin1-to-string x))))
(list (compare x x)
(compare x y)))
On Wed, Aug 1, 2012 at 3:28 PM, Ron Garret <ron at flownet.com> wrote:
> On Aug 1, 2012, at 12:22 PM, Taoufik Dachraoui wrote:
> > Ok thanks
> > I solved the problem by doing using (intern (symbol-name (gensym)))
> instead of (gensym)
> > I did not know that the generated symbols do not belong to any package:
> > (symbol-package '#:G34159)
> > > NIL
> You might also want to take a look at GENTEMP.
> > Is there any reason for this? because usually a symbol is interned in
> the current package
> Not when you make it with GENSYM (which uses MAKE-SYMBOL) The Lisp reader
> interns symbols in the current package, but MAKE-SYMBOL doesn't.
> You really should read the paper I pointed you to. All of it.
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Openmcl-devel