One more point regarding = and == (more flamage)

Blair P. Houghton bhoughto at nevin.intel.com
Sun Mar 24 16:24:27 AEST 1991


In article <632 at taumet.com> steve at taumet.com (Stephen Clamage) writes:
>bhoughto at pima.intel.com (Blair P. Houghton) writes:
>>Put [comments] in, and make
>>them accurate, and it doesn't matter how much the code obfuscates.

Yep.  I said "accurate", all right.

>The compiler doesn't check comments, and there is never any guarantee
>that a comment matches the adjoining code.

The compiler doesn't give a doo-doo that you included
the explicit compare-not-equal-to-zero, either (modulo
optimization).  Comments are for humans.

I make no apologies for idiots who happen to learn to type
program tokens in cc'able order.

There's never any guarantee that the code matches the spec,
nor any that the spec matches the enhancement request,
nor especially any that the enhancement request matches
the performance needing improvement.

Hey, the real world encroaches.  I simply consider

	/* assign-cum-check */
	if ( a=b )

more expressive, readable, correct, and professional than

	if ( (a=b) != 0 )

				--Blair
				  "/* flames to /dev/null */
				   if ( !dev ) flame_away();"



More information about the Comp.lang.c mailing list