Subject: Re: Request for help constructing a simple macro
From: rpw3@rpw3.org (Rob Warnock)
Date: Sat, 03 Mar 2007 22:39:14 -0600
Newsgroups: comp.lang.lisp
Message-ID: <JNSdnZZ-yO3v0HfYnZ2dnUVZ_qKqnZ2d@speakeasy.net>
Dan Bensen  <randomgeek@cyberspace.net> wrote:
+---------------
| Rob Warnock wrote:
| > | It takes up space. You can create an unbound symbol (object) with the 
| > | function GENSYM. It will have a print name (a member variable), but you 
| > | won't be able to use it (no binding).
| > +---------------
| > 
| > Sure you can use it, just not for its "value"! 
| 
| Which was exactly my point.  The "it" in "you won't be able to use it"
| referred to the print name, not the object itself.
+---------------

Well, even there, you *can* access the print name of an
uninterned symbol, as long as you hold a reference to it:

    > (make-symbol "An uninterned SYMBOL")

    #:|An uninterned SYMBOL|
    > (symbol-name *)

    "An uninterned SYMBOL"
    > (format t "Print name: ~a~%" (symbol-name **))
    Print name: An uninterned SYMBOL
    NIL
    > 

You just can't get a reference to it knowing *only* the print name...


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607