From owner-freebsd-hackers Tue May 28 11:03:23 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA18112 for hackers-outgoing; Tue, 28 May 1996 11:03:23 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA18095 for ; Tue, 28 May 1996 11:03:19 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA11424; Tue, 28 May 1996 11:01:22 -0700 From: Terry Lambert Message-Id: <199605281801.LAA11424@phaeton.artisoft.com> Subject: Re: Indentation styles To: rnordier@iafrica.com (Robert Nordier) Date: Tue, 28 May 1996 11:01:22 -0700 (MST) Cc: grog@lemis.de, hackers@FreeBSD.ORG In-Reply-To: <199605281137.NAA00234@eac.iafrica.com> from "Robert Nordier" at May 28, 96 01:37:53 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > The Bell Labs 'Indian Hill Style Guide' is generally regarded as the > most authoritative of such guides, by those who take these matters > seriously. It has this to say about 'indent' and friends: [ ... ] > Automatic beautifiers can only be applied > to complete, syntactically correct programs and hence > are not available when the need for attention to white > space and indentation is greatest. [ ... ] This is no longer true because of language sensitive editor technology, as in Brief, the UNIX "Brief clone", and the Borland and Microsoft offerings. > (For those influenced by Classical allusions, the Greek legend of > Procrustes is also very apposite.) As opposed to "opposite" or "apostate"? 8-) 8-). > I think Greg's concern in valid, but this is one of Nature's > Insoluble Problems. Let's have some sanity, please! At one time I suggested running a "beautifier" on code as part of the CVS commit process. I still like the idea. I also like the idea of running a local style template on checkout from a CVS tree. 8-). This dodges the "incomplete program" problem, above. Obviously, much of KNF style has evolved from the defaults for the vi editor and other tools to allow quick reference of the code (ie: "grep \^functionname *.c" to find: functionname( ... and so on. As long as these tools are "the approved tools", then there needs to be some form of style enforcement to allow them to work as expected (my own placement of spacing in parenthesis allows editor macros to directly access tags files and man pages. Obviously, it's also a tools-driven decision). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.