[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Backquote idioms
Date: Wed, 22 May 85 14:33:01 edt
From: Steven M. Haflich <smh@mit-eddie.ARPA>
From @SU-AI.ARPA:DCP@SCRC-STONY-BROOK.ARPA Wed May 22 12:01:25 1985
Subject: Backquote idioms
Do you all believe these?
Does it matter? RWK said he has never used a triple backquote.
Neither have I. There may be applications which are really good
hacks, but can they be maintained? Even some double nested backquotes
require enough though[t] that they should probably be avoided.
Conciseness and compactness does not imply clarity and robustness.
I plead that it *does* matter. It does not depend on the wisdom of
anyone (other than my good friend Bernie) writing triple nested
backquotes. Consider rather automatic code generators. Sometimes a
code generator needs output source code to a file, instead of
generating forms in memory. Backquotes exist not to provide any
additional expressiveness in printed representations, but (roughly) to
make clearer constructions which embed the results of form evaluation
inside a template. It is conceivable that a good automatic code
generator could use backquotes to aid human readablility of its
output, if only to aid debugging. But an automatic code generator
might, like Bernie, lack sufficient discretion not to nest backquotes
in cases where readability is indeed *not* enhanced.
Indeed. All too much mail on this list recently seems to address the
issue of what `reasonable people' should do. As much as possible,
people shouldn't be writing programs; programs should be writing programs.
And as such, it matters critically that language features be clearly
defined to arbitrary levels of complexity. eg, I have programs that
convert backquote syntax to LIST syntax and back, and I would be -very-
aggravated if I had to pass level-number parameters around to make sure
I wasn't nesting excessively. Just because people get bogged down with
the number 7 plus or minus 2 doesn't mean programs do...
I also disagree fully with the notion that 3-level is too deep. I think
,',',',',', is quite readable. I don't think ,',,',',, is as readable.
Probably most of us find CAAAAAAAAR more readable than CADAADDAAR, though.
I do use triply-nested backquote, though, and believe it to be even
stylistically reasonable on occassion.
I apologise to BSG for pulling his leg a little, but the point is
serious: CLTL must either document firmly that more than two levels
of backquotes are undefined, or else the reader grammar must be clear
and obeyed by all implementations.
Fine for a style handbook to claim that common idioms are preferred,etc
but not fine for the language spec to take any stand at all other than
to say what the definition is in a way that is neatly recursively defined.