[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: firstname.lastname@example.org
- Subject: nested backquotes
- From: Jon L White <email@example.com>
- Date: Mon, 14 Nov 88 14:34:27 PST
- Cc: firstname.lastname@example.org, email@example.com
- In-reply-to: Don Cohen's message of Mon, 14 Nov 88 09:11:39 PST <8811141711.AA04256@vaxa.isi.edu>
The problem with "explanations" of backquote is that they tend to be
much longer than the "production rules" on CLtL p.349-50. Of course,
the problem with CLtL here is opacity.
The only rule I ever remember, and found quite useful, is:
"When in doubt, Hack it out."
In short, after implementing the rules of CLtL rigorously, then I just
try reading (and sometimes macroexpanding) several variants of the form
I'm trying to build up. Apart from ultimately matching the depth of
nesting for commas and backquotes, I just try a lot of variations of
",," ",'," ",,@" etc. You'd be surprised how useful the "hack it out"
rule is! especially in leanring when ",'," must be used instead of ",,".
One program I was writing once wound up 6 levels deep; the "hack it out"
rule wasn't very helpful here, because the expression was too large.
Ultimately, I wound up finding a "break point", and pulled out some of
the code into a separate function, much as you originally did in your
first example with BUILD-LET-LIST. At that point it was 4 levels and 2
levels -- much more managable.
-- JonL --