Subject: Re: 8-space indents considered harmful
To: Darren Reed <>
From: Brian C. Grayson <>
List: tech-kern
Date: 01/25/2000 00:52:35
On Tue, Jan 25, 2000 at 12:34:17AM +1100, Darren Reed wrote:
> Another good rule of thumb is that if your indentation is such that you
> cannot `squeeze' meaningful code on the right hand side due to lack of
> columns (limitation is 80) then the code needs to be restructured.

  For me, code readibility is improved, for _my_ personal projects,
more by longer names (10-20 chars) and small indents (to avoid "spurious"
wrapping from the long variable and function names) than by wider
indents, so I use 2 spaces.  But that is purely what works for me.

  One thing that would make all of this moot would be for someone
to fix indent(1) so that it can KNF-ify code.  Or, change the def
of KNF, as far as indents, to "what indent gives when fed
/usr/share/misc/".  Then, folks who like nonstandard
indents could simply run the code through indent on every checkout,
and re-run it with sw=8 (in vi-speak) before every checkin.  

  Notice that /usr/src/usr.bin/indent/README says that indent was
created to squash just such a religious war, back in _1976_.  What
goes around....

  Things could be worse:  Someone I know uses 3 spaces.  And
sets tabstops to be 3 spaces.  And believes that the following is
readable code:

   if (some condition)
   {  first statement;		<== Note statement on same line as {
      second statement;

  Ack! Phbbbbppt! =:|