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

Blair P. Houghton bhoughto at pima.intel.com
Sat Mar 23 13:35:06 AEST 1991


In article <q95Gsdc61 at cs.psu.edu> mckulka at eldalonde.endor.cs.psu.edu (Christopher Mc Kulka) writes:
>In article <3182 at inews.intel.com> bhoughto at pima.intel.com (Blair P. Houghton) writes:
>>It's called top-down design, and involves _thinking_ before
>>you start making mistakes.
>
>Ahhh, it must be perfect in a perfect world where people do not make mistakes
>by *ACCIDENT*.  Have you never missed an '=' or slipped in a ';' instead of a
>',', or etc.

Very little starts out bug-free, and very little more ends
up bug-free.  RTFM lint(1), adb(1), and man(7).

>Last time I checked I usually found mistakes after *thinking* I did not make
>any.

I never think that, nor do I add irrelevant and redundant
code which could add errors as easily as prevent them.

I test my code, thoroughly and mercilessly, and if it's
defective I offer to repair or replace it, at my discretion :-).

>PS - If you have discovered a tonic that makes it possible to write programs
>     larger than "Hello, world." correctly the first time, PLEASE let the rest
>     of us know about it.  We can *bury* Japan in a year.

That depends on what you mean by "first time."  As far as
I'm concerned it's not actually written until it's
shar'red up and sent off to Rich $alz, and then that's only
Draft_0.  RTFM diff(1) and patch(1gnu).

We're already burying Japan.  It's a well-known fact that
the Japanese have been writing the sloggingest software in the
history of computing since they discovered it takes
instructions to motivate an instruction set.  America
owns the software industry [*].  (However, they are getting
a massive lead in the natural-language-processing arena;
one Japanese company has a program that will translate
Japanese into English at 3000 words per hour).

The grander point here is that

	if ( (*x = *y) != 0 )

tells me nothing, and the `!= 0' part merely tells me a
piece of the nothing that I already know; in fact, I'm
likely to examine the expression `(*x = *x) != 0' and
compare its result to zero, in my head, just as the object
code will do if the compiler doesn't know diddly about
optimization.

If you're going to bother adding information to your
thesis, at least make it constructive and not obfuscatorily
redundant.

				--Blair
				  "/* end of posting */"

/* the following must, therefore, be a bug */

[*] If you want to bury the Japanese in manufacturing, as
well, well, that'll take a few dozen years of sweeping
educational reform; it has to do with the consistent and
widespread ability of the people understand the technologies
they are implementing.  We still think we're hot shit as a
nation if Americans dominate Billboard's Top 40.

P.P.S.  What is this, talk.politics.flame.c.japanese?



More information about the Comp.lang.c mailing list