The wonders of C

cottrell at NBS-VMS cottrell at NBS-VMS
Wed Mar 27 05:08:30 AEST 1985


/*
> 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 depends on how you write code. I do lotsa bit twiddling, therefore I
got lotsa `&' & `|'. I avoid multiple condition tests, therefore I 
seldom have `&&' & `||'. 

> 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.

There are thos of us who consider verbosity the scourge of readability.
`Begin' & `end', e.g.,just clutter up the listing & spread it out more. I
HAVE been bitten by saying `if (c = NL)' a lot tho. Oh well.

	jim		cottrell at nbs
*/



More information about the Comp.lang.c mailing list