Standard Indentation etc.
Richard A. O'Keefe
ok at quintus.uucp
Mon Dec 19 16:14:21 AEST 1988
In article <1988Dec18.003828.27013 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
>In article <879 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>>...8 columns is _way_ too big for an indentation increment.
>>The range recommended by everyone except C let's-torture-test-the-eyes
>>hackers is two to five columns for an indentation increment.
>
>8 columns is just fine for people who split up their code into functions
>instead of cramming it all into giant monolithic lumps. Don't view hitting
>the right margin with 8-column indents as a sign of overly-big indents,
>view it as a sign of overly-complex code that needs to be broken up. I
>find that this is *almost* always the right view, in hindsight.
This is a complete misunderstanding of my point. My point is not that
code runs off the right margin. What I'm complaining about is that 8
columns is just too big a jump for the eye. Heck, I could use Spencer's
argument to justify 16-column indents. I had never seen anyone use
indent-by-8 before I met C: good Fortran programmers used 2 to 5, good
COBOL programmers used 2 to 5, good Algol programmers used 2 to 5, good
PL/I programmers used 2 to 5, good BCPL programmers used 2 to 5, and so
on. Of course, this was on mainframes, where you didn't _have_ a tab
character. (Where the tab key on a keypunch took you depended on the
program you had on its drum.) I personally find 2 too small and 5 too
big, preferring 3 or 4. But 2 and 5 are tolerable. Fitting onto a line
or not fitting onto a line, 8 is too visually tiring. Think about the
size of paragraph indentation. Think about how poetry is laid out.
More information about the Comp.lang.c
mailing list