[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Backquote idioms
While I am not prepared to defend the clarity of the original
ONCE-ONLIFY-INDEX-OFFSET, I can say that the proposed replacement
bothers me because of the repeated SETQ-ing of the argument variable
FORM. It's hard to condemn nesting per se, as LISP is perhaps the
quintessence of nesting languages.
I think it *is* quite clear, with an order of magnitude less than ten
seconds' thought, that ONCE-ONLIFY-INDEX-OFFSET is not depending on
repeated evaluation of T or NIL: the value of WAS-IXO is a gensym, which
is certainly not T or NIL. (In fact, that gensym is bound by a LET
generated by the first level of backquote.)
I have, once or twice in my career, had a need to write a macro that
generates macros that generate code--and then need to abstract that
ouetr macro yet again. This leads to triply nested backquotes.
Generating things incrementally this way is not difficult at all,
proceeding one layer of abstraction at a time. I wanted to investigate
things from the point of the (human) reader, who sees the whole thing
all at once.
I use `',x a LOT.
--Guy