Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!ccncsu!ncr-fc!chuckp From: chuckp@ncr-fc.FtCollins.NCR.com (Chuck Phillips) Newsgroups: comp.lang.c Subject: Re: #define OR || Message-ID: Date: 2 Feb 90 19:55:11 GMT References: <5940014@hpcupt1.HP.COM> <33889@ucbvax.BERKELEY.EDU> <1922@gmdzi.UUCP> <33948@ucbvax.BERKELEY.EDU> <3474@uceng.UC.EDU> Sender: news@ncr-fc.FtCollins.NCR.COM Organization: NCR Microelectronics, Ft. Collins, CO Lines: 32 In-reply-to: dmocsny@uceng.UC.EDU's message of 29 Jan 90 19:27:27 GMT On 29 Jan 90 19:27:27 GMT, dmocsny@uceng.UC.EDU (daniel mocsny) said: daniel> In article <33948@ucbvax.BERKELEY.EDU> jwl@ernie.Berkeley.EDU.UUCP (James Wilbur Lewis) writes: >In article <1922@gmdzi.UUCP> wittig@gmdzi.UUCP (Georg Wittig) writes: >- if (n < MAX AND_THEN a[n] > b.k) >- >- is *not* irritating to read and maintain. It explicitly says what was >- intended by the programmer. >Irritation is in the mind of the maintainer! YOU might like it, but believe >me, if I ran across code like this I'd be tempted to seize a heavy blunt >object and track down the author! daniel> ... daniel> The C preprocessor has no problem looking at #define's and transforming daniel> the following code back into standard C. So what is wrong with having daniel> a tool that de-customizes programmer A's syntax back into a form daniel> pleasing to programmer B? ... Nothing so long as those creating their own language via the pre-processor _actually provide_ a de-customizer to those who will maintain the code. (No, the preprocessor itself is _not_ an acceptable substitute, because of constants, etc.) How many macro manglers out there have been considerate enough to provide such a tool? How many have taken the effort to ensure that the output always compiles _identically_ to the mangled version? Raise your hands. Ah, congratulations to the both of you. :-) -- Chuck Phillips -- chuckp%ncr-fc.FtCollins.NCR.COM uunet!ncrlnk!ncr-sd!chuckp%ncr-fc ccncsu.ColoState.EDU!chuckp%ncr-fc