[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: '#:foobar versus (make-symbol "FOOBAR")
- To: email@example.com
- Subject: Re: '#:foobar versus (make-symbol "FOOBAR")
- From: dmg@goldilocks.LCS.MIT.EDU
- Date: Fri, 08 Mar 91 10:00:13 EST
- In-reply-to: Your message of Fri, 08 Mar 91 07:11:35 -0500. <9103081211.AA24170@breeze.bellcore.com>
Reply to: firstname.lastname@example.org (Mark Rosenstein)
Ummm. Using a reader macro, could you get screwed by nested
calls to the macro? With make-symbol, you are guarenteed to
be getting a new symbol each time the macro is expanded, but
with the reader macro, I think, you may only get one symbol
per macro definition.
Yes, this is a good point, I was less than clear about the assumptions
I made. On the subject of using #: for new local variables in macro
expansions, the scoping rules guarantee that this won't be a problem
since the result forms are nested as well (meaning LET will shadow
the binding of the symbol). In this case, it should be clear that
using #: is more space efficient than using make-symbol, since
use of distinct symbols for nested bindings is unnecessary.
I did come across ONE screw case where nested non-hygenic macros
caused a problem... but I can't remember what it was. When I thougt
the problem out, I realized that I was on the wrong track anyway.