allowing braces around suites
apardon at forel.vub.ac.be
Mon Sep 6 08:52:41 CEST 2004
Op 2004-08-31, Isaac To schreef <iketo2 at netscape.net>:
>>>>>> "Antoon" == Antoon Pardon <apardon at forel.vub.ac.be> writes:
> Antoon> I used to limit myself to indentation to see which code
> Antoon> belonged to which control. But then I found myself witch
> Antoon> controls that were so nested it was hard to see to which
> Antoon> if a particular else suite belonged
> This is a clear sign that you nest too much, and no matter how the
> language looks like your code become very hard to read.
I would agree if it still was hard to see when end markers are
> I'm now used
> to write in C using 8-spaces tabs, with no more than 5 levels of
> indentation (typically 3 levels), and the screen width is maintained
> at 80 columns.
I have had code with only 4 levels of indentation in which I find that
end markers help a lot in finding out which if an else belongs too.
> My rationale is very simple: if Linux kernel hackers
> can do that with their sorely complicated project and I find any
> problem on my own little projects, I must have some real problem.
But C has end markers. So that programmers in a language with end
markers can easily nest up to a certain level doesn't mean that
the same code indented the same but without end markers would be
just as easily readable.
More information about the Python-list