Indentation of Python interpreter C source (was Re: [Python-Dev] Re: [Python-chec....)

Peter Funk pf@artcom-gmbh.de
Sun, 2 Apr 2000 10:03:29 +0200 (MEST)


Hi!

> [Peter Funk]
> > -1 for C reformatting.  The 4 space intendation seesm reasonable for
> > Python sources, but I disaggree for C code.  C is not Python.
 
Tim Peters:
> Code is code.  The project I work on professionally is a half million lines
> of C++, and 4-space indents are rigidly enforced -- works great.  It makes
> just as much sense for C as for Python, and for all the same reasons.  The
> one formal study I've seen on this showed that comprehension levels peaked
> at indent levels of 3 and 4, dropping off on both sides.

Sigh... 

Well, if the Python-Interpreter C sources were indented with 4 spaces
from the very beginning, I would have kept my mouth shut!  But as
we can't get the whole world to aggree on how to indent C-Sources,
we should at least try to avoid the loss off energy and time, the
debate on this topic will cause.

So what's my point?

IMO reformatting the C-sources wouldn't do us any favor.  

There will always be people, who like another indentation style more.
The GNU software and the Linux kernel have set some standards within
the open source community.  These projects represent a reasonable
fraction of programmers that may be potential contributors to
other open source projects.  So the only effect a reformatting from 8 to 4
space indents would be to disturb the "8-spacers" and causing endless
discussions like this one.  Period.

> However, tabs in C is one of Guido's endearing inconsistencies, and we don't
> want to lose the only two of those he has <wink> (his other is trying to
> avoid curly braces whenever possible in C, perhaps out of the same perverse
> sense of pride I used to take in avoiding redundant semicolons in Pascal
> <;{} wink>.

Aggreed.

Best reagrds, Peter