C bites / programming style

Vicious Oyster oyster at uwmacc.UUCP
Tue Sep 10 02:50:07 AEST 1985


In article <411 at npois.UUCP> adam at npois.UUCP (Adam V. Reed) writes:
>
>According to K&R, Appendix A, section 9, the braces together with the
>declarations and statements they enclose form a single syntactic entity
>called "compound statement" or, equivalently, "block". This means that
>the braces are conceptually associated with the statements they enclose,
>and NOT with anything before or after. I use the form on the right
>exclusively, because I find it easier to keep a "block" together in my
>mind if it looks like, well, a single BLOCK. Except for people who have
>assimilated some very sloppy mental habits, programs are easier to read
>if visual entities correspond to syntactic and conceptual entities.

   What!?  The compound statement to be or not to be executed depending on
the value of an "if" expression has no conceptual association with that "if"
clause???  Well I'll be damned!  I guess I'll just leave out all the if's, and
while's, and repeat's, and for's in my programs.
   Sloppy mental habits?  Harumph!

--
 - joel "vo" plutchak
{allegra,ihnp4,seismo}!uwvax!uwmacc!oyster

Disclaimer:  Most of my postings have a :-) by default.



More information about the Comp.lang.c mailing list