Subject: Re: 8-space indents considered harmful
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 01/24/2000 17:38:51
>> [...]
> This rather smacks of a knee jerk reaction based on it not confirming
> your prejudices.

*My* prejudices?

Are you perhaps jumping to the conclusion that because I'm opposing
this particular attempt to modify KNF, I must like 8-space indents?

If so, you're wrong.  I don't.  My own code all uses 3-space indents, a
style I developed fairly independently of anything but which happened
to end up somewhat like GNU style.  (If you want examples, I can send
you lots; if you have or can find anything I wrote without external
style constraints, it should look more or less the same - I mostly
settled on my style before I wrote anything that got widely spread.)

I cordially dislike KNF; there are numerous things I'd do to it if I
wanted to produce something I found easy to work with, starting with
brace placement first, whitespace (including indentation) second, and
multiple objects in a single declaration third.

So why am I arguing against these changes?

Because I think they're ill thought out.

Because it would be an incredible flag day for diffs, if we reformat
everything; because it will mean intra-tree inconsistency, if not.

Because the study that seems to be the only thing ever cited in support
of them appears to have numerous flaws[%], some in its own right and
some only with respect to its applicability here, and as a scientist I
won't stand still for that.

[%] At least, it's reported as such, and the one person who's
    supporting it hasn't even tried to deny them that I can see.

>> - It started out trying to show what it ended up showing.
> Be realistic. Every experiment is done to prove or disprove a
> hypothesis.

Such experiments are, generally, bad science (except in certain
pedagogical contexts, in which case the result of the experiment is not
really where the science lies in it).  Good science does experiments to
*test* hypotheses, not to confirm prejudices.

>> - It was done for a very different language (Pascal).
> But human perception no doubt hasn't changed.

No...but C and Pascal are sufficiently different in perceptual ways
that it's not clear that human perception of one bears all that much
relationship to human perception of the other.  (As a simple example,
the C block markers are discriminable from language keywords and
variable names at a comparatively early stage of visual processing; in
Pascal this isn't true.)

>> - The deeper-indented code was not written that way, but rather was
>>    mechanically generated by reformatting code written with smaller
>>    indentation levels.
> That does indeed seem to be a deficiency.  Whether you view it as a
> serious one is up to you.

It is probably a strength for the study, given its original goals.  But
for our purposes, it quite probably makes the study worthless, because
it means that the comprehension difference the study found is in part
not a difference due to indentation levels but actually a difference
due to the difference between code that was written as presented and
code that was written differently and then mechanically (=stupidly)
massaged into its presentation format.  Whether this difference
cooperates with or is antagonistic to the effect (if any) of
indentation remains to be determined.

>> More like, it seems to me, why should we pay attention to badly
>> flawed research
> Again, thats a pretty serious accusation to make about some work you
> don't know much about!

Okay, "research that has been reported as having bad flaws by someone
who claims to have read it, claimed flaws that have not been denied by
even its major (and apparently lone) supporter in this discussion".

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B