Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? Message-ID: <15617@smoke.brl.mil> Date: 28 Mar 91 22:20:16 GMT References: <357@ptcburp.ptcbu.oz.au> <1991Mar19.192416.13756@unlv.edu> <1991Mar28.004147.705@worf.harvard.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 17 In article <1991Mar28.004147.705@worf.harvard.edu> dmm@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.