Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: documentation standards for C Message-ID: <8675@utzoo.UUCP> Date: Mon, 28-Sep-87 22:10:31 EDT Article-I.D.: utzoo.8675 Posted: Mon Sep 28 22:10:31 1987 Date-Received: Mon, 28-Sep-87 22:10:31 EDT References: <9500@brl-adm.ARPA> Organization: U of Toronto Zoology Lines: 23 > What purpose does the so-called k&r indenting style serve: > (personally, i dis-like it because its hell to debug). K&R style has precisely one major advantage: it is standard. Any C programmer can expect to have to develop some facility in reading it, especially in a source-licensed Unix installation. The same is not true of any other style. Personally, I dislike writing comments in English; Loglan or Esperanto would be much more sensible. :-) :-) However, the overriding goal is *communication*, and the fact is that my audience will understand the stuff a whole lot better if it is written in a language they are familiar with. The same thing applies to paragraphing styles. By the way, there is a pervasive myth that K&R style is hard to use. Wrong. It is hard to learn. Once learned, no problem. I thought it was hard to use and error-prone too, until our conversion to V7 required me to spend a lot of time hacking K&R-style code. Once I *really* learned it, all of a sudden it was easy to use and no more error-prone than any other (including the one I previously preferred). -- "There's a lot more to do in space | Henry Spencer @ U of Toronto Zoology than sending people to Mars." --Bova | {allegra,ihnp4,decvax,utai}!utzoo!henry