The wonders of C

Wayne Throop throopw at rtp47.UUCP
Mon Mar 25 04:23:26 AEST 1985


> Actually, there are those of who, disliking both the "="/"==" closeness
> and the "!="/"|=" closeness, use "EQ" for "==" and "NE" for "!=", which
> C allows by means of #define.
> 
> David	sde at mitre-bedford
> 
> P.S. I do, however, agree that it was ergonomically foolish to count
> relative uses of assignment vs. comparison to come up with =/== instead
> of :=/=. How many hours of debug time (and how many debug keystrokes)
> does it take, after all, to use up the marginal saving of some keystrokes in
> initial entry?
> 

It seems to me that the normally-cited "save keystrokes" reason for
the =/== choice cannot be correct.  If it were, wouldn't the choice for
the &/&& and |/|| operators be reversed?  &&'s are much more common than
&'s in almost all C code I have seen.

It also seems clear that saving keystrokes is almost never a valid concern.
What needs to be optimized is readability.  Even in the case of my own
code, let alone others, I read it much more often than I write it.



More information about the Comp.lang.c mailing list