guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is gentemp or gensym "safe"?


From: Nicolas Neuss
Subject: Re: Is gentemp or gensym "safe"?
Date: 25 Apr 2001 18:15:02 +0200

Rob Browning <address@hidden> writes:

> Martin Grabmueller <address@hidden> writes:
> 
> > For me it does take 0 to 2 args.
> 
> Perhaps a difference between guile 1.4 and guile cvs then...
> 
> > The implementation of gentemp looks like it is avoiding already
> > defined symbols, but it obviously doesn't.  What's wrong here?
> > 
> > guile> (gensym "foo")   
> > foo1
> > guile> (gensym "foo")
> > foo2
> > guile> (define foo3 1)
> > guile> foo3
> > 1
> > guile> (gensym "foo") 
> > foo3
> 
> ISTR that common-lisp solved this by having gensym return names from a
> reserved namspace that were supposed to globally unique...

I guess, no.  The decisive point with gensyms is that they are not eq?
to any ordinary symbol.  That means that the name does not matter, but
only memory address.  Did you tes if they are eq?.

Yours, Nicolas.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]