From ... From: Erik Naggum Subject: Re: gensym vs make-symbol [was: Re: newbie: please don't smash my case ] Date: 2000/07/12 Message-ID: <3172397911664803@naggum.net>#1/1 X-Deja-AN: 645489828 References: <3967677E.B534B640@pacbell.net> <3172082763674005@naggum.net> <8k8t64$374i0$1@fido.engr.sgi.com> <3968EA69.49CD02AD@pacbell.net> <5166qcdl8o.fsf@zip.local> mail-copies-to: never Content-Type: text/plain; charset=us-ascii X-Complaints-To: newsmaster@eunet.no X-Trace: oslo-nntp.eunet.no 963412544 18268 195.0.192.66 (12 Jul 2000 14:35:44 GMT) Organization: Naggum Software; vox: +47 8800 8879; fax: +47 8800 8601; http://naggum.no; http://naggum.net User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 Mime-Version: 1.0 NNTP-Posting-Date: 12 Jul 2000 14:35:44 GMT Newsgroups: comp.lang.lisp * lnp@healy.washington.dc.us | Though I could get away with make-symbol in some spots, gensym is | necessary for reasons elaborated previously in this thread. Huh? To code, there is no difference between using make-symbol and gensym. And if you compare uninterned symbols with string=, you're doing it the wrong way, anyway. You have to do the same thing the cirularity detector in the printer is doing it, except you get away with a single pass. | What I've come up with is using *gensym-counter*. Prior to each | top-level expansion, bind this to the same fixed value. Each | expansion should produce the same thing, no? No, the gensym'ed symbols are still unique to each invocation. That's the whole point. | Are there any flaws in my reasoning? Yes, you have not understood what an uninterned symbol is. They are symbols, and as such eq if you have more of the same, but they are _not_ the same symbol just because they print the same. (eq '#:foo '#:foo) => nil (eq 'foo 'foo) => t (string= '#:foo '#:foo) => t (eq (symbol-name '#:foo) (symbol-name '#:foo)) => (eq '#1=#:foo '#1#) => t #:Erik -- If this is not what you expected, please alter your expectations.