Re: macro that writes macros
- From: Dan Bensen <randomgeek@xxxxxxxxxxxxxx>
- Date: Sun, 30 Dec 2007 03:09:59 -0600
Sacha wrote:
how to get rid of these ','symbol things.
Try here:
http://bc.tech.coop/blog/041205.html
So what are you guys usually doing to avoid these ? Do you avoid these at all ?
I've been using them. The secret seems to be that the innermost
backquote is associated with the leftmost comma, but the comma
isn't evaluated. So backquote-comma pairing does occur for the
inner backquote, even though it's quoted by the outer backquote,
but evaluation of the comma does not occur. I guess the comma
is quoted because its backquote is quoted. But somehow that
doesn't prevent READ and/or EVAL from pairing them up.
(defvar bar :bar)
``(,foo ,',bar) => `(,FOO :BAR)
bar is eval'd because the second comma before it belongs to the
outer backquote, which is eval'd. foo is not eval'd because
its comma belongs to the uneval'd inner backquote. What I don't
understand is why the ,' before ,bar disappears. Even though
it's a no-op, it seems like something is automagically evaluating
or pruning it when it should be quoted.
--
Dan
www.prairienet.org/~dsb/
.
- References:
- macro that writes macros
- From: jordi . burguet . castell
- Re: macro that writes macros
- From: Sacha
- macro that writes macros
- Prev by Date: Re: Curses alternative for Lisp?
- Next by Date: Re: RFC: Extending method specializers
- Previous by thread: Re: macro that writes macros
- Next by thread: Re: macro that writes macros
- Index(es):
Relevant Pages
|