Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 1996 11:01:22 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        rnordier@iafrica.com (Robert Nordier)
Cc:        grog@lemis.de, hackers@FreeBSD.ORG
Subject:   Re: Indentation styles
Message-ID:  <199605281801.LAA11424@phaeton.artisoft.com>
In-Reply-To: <199605281137.NAA00234@eac.iafrica.com> from "Robert Nordier" at May 28, 96 01:37:53 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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:

<type declarator>
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605281801.LAA11424>