Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site cyb-eng.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!think!harvard!seismo!ut-sally!oakhill!cyb-eng!bc From: bc@cyb-eng.UUCP (Bill Crews) Newsgroups: net.lang.c Subject: Re: C Programming Style -- New thought Message-ID: <601@cyb-eng.UUCP> Date: Sun, 28-Jul-85 18:00:56 EDT Article-I.D.: cyb-eng.601 Posted: Sun Jul 28 18:00:56 1985 Date-Received: Wed, 31-Jul-85 04:28:10 EDT References: <418@spar.UUCP> Organization: Cyb Systems, Austin, TX Lines: 33 > A related issues is whether it is "worth it", in the same tradeoff, to have > an extra line for '{' or for '}'. (My personal opinion is "no" for the > former and "yes" for the latter.) Although most programmers in the early sixties used horizontal white space very little, rather typing "i=i+1" into their Fortran compilers, most today seem to value horizontal white space and thus use it ("i += 1"). I think this is a significant, though small, advance. It does, however, cause the right margin to become more of a problem. I think vertical white space is also useful in achieving greater readability. When reading code, especially code which is unfamiliar and uncommented, breaks at logical intervals (before for statements, around comments, etc) are *very* valuable. Also, putting the { on its own line allows the { and } to be aligned and likewise adds white space. Clearly, the bottom edge of the screen or printed page becomes more of a problem. > Incidentally, I avoid printouts wherever possible in developing code: I use > them only when I cannot get to a terminal for some reason -- I cannot > imagine circumstances in which my preference would be the other way around. > (Well, maybe 300 baud ...) I find 24 x 80 to be a quite small and confining window. Try using Star- or Sun-like screen some time. They can spoil one easily. Since I don't have one myself, I get listings more often than I would otherwise. Perhaps one day soon we'll be freed from this norm form the past (sigh). -- / \ Bill Crews ( bc ) Cyb Systems, Inc \__/ Austin, Texas [ gatech | ihnp4 | nbires | seismo | ucb-vax ] ! ut-sally ! cyb-eng ! bc