When do you use "if ( a = b )"?

Doug Gwyn gwyn at smoke.brl.mil
Fri Mar 29 08:20:16 AEST 1991


In article <1991Mar28.004147.705 at worf.harvard.edu> dmm at cfa.harvard.edu (David Meleedy) writes:
>I would like to respond to the view that statements such as
>#define EQU ==
>are to be avoided.
>I disagree entirely.

You are entitled to your opinion, but I should point out that such
use of the preprocessor was used by Steve Bourne in the source code
for the Bourne shell (/bin/sh) and the "adb" debugger on UNIX, in
order to make the code look more like Algol (just as in your example),
and programmers that had to maintain that code almost invariably
cursed Bourne for doing that.  Eventually, the Bourne shell source
was de-Algolized (by Dave Korn, if I recall correctly), so the version
that AT&T now distributes (and that I for one maintain for BRL) is now
in ordinary C.  Even though I had gotten accustomed to the Algolized
version, I like the patent C version much better; I have only ONE
programming language to conceptually deal with, not TWO.



More information about the Comp.lang.c mailing list