Macro names imbedded in pp-numbers [repost]

Larry Jones scjones at sdrc.UUCP
Mon Nov 20 07:09:28 AEST 1989


In article <11645 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> In article <1653 at crdos1.crd.ge.COM> davidsen at crdos1.UUCP (bill davidsen) writes:
> >but it does look like a case of a committee whose majority is
> >vendors (or was during the two years I was there) choosing a behavior
> >which has no benefit other than to simplify the writing of the parser.
> 
> There were a significant number of user-oriented X3J11 committee
> members (including myself), and of course most vendor representatives
> also function as C users themselves.  We bought into the notion of
> simplicitiy in this case as being of value to programmers as well as
> implementors.  Only ignorant programmers might have a problem, but
> that is true of very many aspects of C; C is not a language for those
> who refuse to learn before doing.  We expect that this particular
> quirk will be taught in C textbooks much as the need for () around
> parameters in macro definitions already is taught.

As another user-oriented committee member, I agree with Doug's
assessment -- the decision was made to keep the specification
simple, not to make implementers' jobs easier.  In fact, a fair
number of committee members found "greedy" pp numbers to be
aesthetically repugnant and a few tried to rewrite the spec to
make them less so.  All of these were found to be defective in
one way or another, although one was so subtle that it nearly got
addopted!  In the end, most everyone agreed that the existing
spec does not cause any serious problems, is simple, and, most
importantly, does cover all the desirable cases.
----
Larry Jones                         UUCP: uunet!sdrc!scjones
SDRC                                      scjones at SDRC.UU.NET
2000 Eastman Dr.                    BIX:  ltl
Milford, OH  45150-2789             AT&T: (513) 576-2070
"You know how Einstein got bad grades as a kid?  Well MINE are even WORSE!"
-Calvin



More information about the Comp.std.c mailing list