Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!jpm@BNL44.ARPA
From: jpm@BNL44.ARPA (John McNamee)
Newsgroups: net.lang.c
Subject: Re: Poll on style issue in comparison
Message-ID: <1702@brl-tgr.ARPA>
Date: Tue, 24-Sep-85 18:47:55 EDT
Article-I.D.: brl-tgr.1702
Posted: Tue Sep 24 18:47:55 1985
Date-Received: Sun, 29-Sep-85 04:12:53 EDT
Sender: news@brl-tgr.ARPA
Lines: 41

[I tried to send this via mail to rcd%opus.uucp@BRL.ARPA, but it was
 rejected, so I'm posting it instead. The original article was asking
 about placing the constant on the left side of the equals sign in if
 tests (i.e. "if (0==strcmp(a,b))").]

>1.  Do you use this form of comparison?

No.
	
>2.  Regardless of whether you use it, how do you feel about it (e.g., other
>    people using it in code that you will maintain)?
>	- dislike it
>	- neutral (OK if you want to do it)
>	- like it

I refuse to work on code that is written that way. I once spent a whole day
undoing that style from a program I had to make changes to.

>3.  If you use or like this way of writing comparisons, how do you feel
>    about also writing ordering tests with the constant first, as
>	if (0    - dislike
>    - neutral
>    - like

People who do that should be taken out and shot. No, on second thought that
would be too quick. They should be tortured before being taken out and shot.

Comment:

What you do in private with consenting compilers is your own business, but
if I'm going to have to maintain your code then you don't have the right
to inflict your style on me. K&R style is readable, and is the standard.
Other than special permission from God, there is no excuse for anything
but K&R style.
--
			 John McNamee
		..!decvax!philabs!sbcs!bnl44!jpm
			jpm@BNL44.ARPA

		  "MS-DOS is a communist plot"