Subject: Re: Time to update KNF?
To: Mike Cheponis <mac@Wireless.Com>
From: Allen Briggs <briggs@ninthwonder.com>
List: tech-kern
Date: 01/19/2000 13:26:19
> > From all of these data, since the highest comprehension scores were noted
> > with 2-space indents, I, once again, believe that KNF should be
> > modified to use 2-space indents.
> But you they/you don't list the source code.  If a program is written to 
> look nice with 2-4 space indents then it typically looks horrible with
> 6-8 space indents.

There is also the comment about the compiler not accepting >80 columns.
There are a number of choices that folks can make for formatting code to
fit 80 columns (as people noted earlier in this thread).  The paper was
also discussing comprehension of printed code--not on-screen code.  I
know that I comprehend things somewhat differently in those two areas...

My personal preference is to use 4 or 8, depending on what I'm doing.
I only use 2 if the code that I'm working on was written with that in
mind.  I also find that I use 2 for Tcl work.  Perhaps interestingly,
I tend to use shorter indents for Windows code due to the longer
function names forcing earlier linewraps.

As for KNF, this is probably not the most important issue as you can
reformat the code for personal consumption relatively easily and
mechanically.  Also, consistency is better than any specific format
(according to my intuition and experience as well as several sources,
including the same study), and any global, sweeping change would be
harmful in a couple of different ways that have already been mentioned.

-allen