Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site burl.UUCP Path: utzoo!watmath!clyde!burl!geoff From: geoff@burl.UUCP (geoff) Newsgroups: net.lang.c Subject: Re: C Indentation Survey Results (long...) Message-ID: <677@burl.UUCP> Date: Thu, 2-May-85 10:28:55 EDT Article-I.D.: burl.677 Posted: Thu May 2 10:28:55 1985 Date-Received: Fri, 3-May-85 03:45:24 EDT References: <9930@brl-tgr.ARPA> <381@busch.UUCP> <5497@utzoo.UUCP> <5557@utzoo.UUCP> Organization: AT&T Technologies, Burlington NC Lines: 22 > I am not arguing that difficulty of learning isn't a defect, by the way. > Just pointing out that the K&R format is being maligned for the wrong > thing. I won't go so far as to say "try it, you'll like it"... but I > will say "if you try it seriously, you'll find it gets a lot easier". > > Henry Spencer @ U of Toronto Zoology > {allegra,ihnp4,linus,decvax}!utzoo!henry When I learned C four years ago, I followed the K&R format for commenting code (i.e., brace at the end of the statement) and liked it. I found it was relatively easy to use, read, etc. I changed my coding style when I went to work (Bell Labs, Denver) to indent all blocks the same way K&R does functions. I found that much easier to read and use because the opening brace is always right above the matching closing brace. I find it is easier to spot the opening brace this way when I go back over code. It does have the liability that fewer meaningful lines appear on the screen, however. I have used it now for two years and will continue to do so. The only other change to the K&R commenting style I have adopted is to place all function arguments on lines by themselves indented by two spaces. geoff sherwood burl!geoff