> Date: Thu, 31 Jan 2002 19:30:31 -0800 > From: Bruce Korb <[EMAIL PROTECTED]>
> > * They learn the wrong quoting rules. > Not wrong, pug-ugly. It is so ugly and hard-to-read that it is hard to maintain. That makes it "wrong", at least in some sense. > All solutions are pug-ugly. Perhaps, but they are not all _equally_ ugly. You can use minimal quoting, as follows: 1. Replace only _unmatched_ [s and ]s with quadigraphs. 2. Surround the resulting strings with [ and ]. 3. If you don't want nested evaluation for a macro argument, surround it with another [ and ]. This approach is much easier to read than the "let's quadrigraph every bracket" approach. > > In this particular case it may be better to teach them to fish > > than to give them a McDonald's Filet-O-Fish Sandwich. > > Well, that it should be so hard to drop a fish pellet into > boiling fat, slap it in bread and push it through the window > bespeaks of some severe design issues. Quoting is _always_ a severe design issue. In every language that has arbitrary strings. One cannot escape it. A lot of it is what you're used to. The quoting rules of m4 are not that bad, once you get used to them. They're simpler than the quoting rules of C, for example. (_Much_ simpler than those of Perl. :-) > It would still be enlightening to know what the issues are with > wrapping autoconf-macro-free text inside changequote-s. There is no problem with doing it at the top level. But there is a problem with using changed quotes within the argument of a macro. That is because the changequote has global effect even though it is executed on behalf of (say) a single string at one evaluation level. If you have nested macro calls, the callee does not know that the caller invoked changequote, and thus the callee will use the wrong quoting rules.