Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!decwrl!shelby!csli!poser From: poser@csli.Stanford.EDU (Bill Poser) Newsgroups: comp.lang.c Subject: Re: C's Limited Macro Capabilities Message-ID: <11250@csli.Stanford.EDU> Date: 4 Dec 89 02:46:35 GMT References: <69517@psuecl.bitnet> Sender: poser@csli.Stanford.EDU (Bill Poser) Reply-To: poser@csli.stanford.edu (Bill Poser) Organization: Center for the Study of Language and Information, Stanford U. Lines: 17 A simple macro processor, like the one we have, is a Good Thing. I am not so sure that a more powerful macro processor along the same lines would be. For one thing, the syntax of macro languages is nasty, and not conducive to good programming practice, and when one writes complex macros, in effect one is making use of a meta-programming language. So my gut reaction to proposals for non-trivial extensions to cpp is generally one of the following, depending on the case at hand: (a) The problem really calls for make(1); (b) The problem is better handled by means of preprocessing by means of an independent language, e.g. AWK or ICON; (c) The user really should be using a language other than C. This is isn't to say that one of these is always the solution or that every extension to cpp is a bad idea, but it does seem to me that complex macro expansions are fragile, hard to document, and easy to abuse.