do people really complain about significant whitespace?
Pierre Barbier de Reuille
p.barbierdereuille at free.fr
Wed Aug 9 08:47:03 EDT 2006
Carl Banks wrote:
> Michiel Sikma wrote:
>> Op 8-aug-2006, om 1:49 heeft Ben Finney het volgende geschreven:
>>
>>> As others have pointed out, these people really do exist, and they
>>> each believe their preconception -- that significant whitespace is
>>> intrinsically wrong -- is valid, and automatically makes Python a
>>> lesser language.
>> Well, I most certainly disagree with that, of course, but you gotta
>> admit that there's something really charming about running an auto-
>> formatting script on a large piece of C code, turning it from an
>> unreadable mess into a beautifully indented and organized document.
>
> The only time I get that satisfaction is when I run the formatter to
> format some C code I'm asked to debug. Quite often the problem was
> something that could have been easily spotted if the coder had used
> good indentation in the first place. Though they probably wouldn't
> have seen it anyways, considering the poor programming skills of most
> engineers (the classical definition, not computer engineers).
>
> The very fact the code formatters exist should tell you that grouping
> by indentation is superior.
>
>
> Carl Banks
>
Problem being : grouping by indentation do *not* imply good indentation.
For example, I had to read a piece of (almost working) code which looked
like that :
if cond1 : stmt1
stmt2
stmt3
if cond2: stmt4
stmt5
elif cond3: stmt6
stmt7
else: stmt8
stmt9
stmt10
stmt11
So you can tell what you want, but this code is valid but impossible to
read and impossible to reindent correctly. So although I personnaly like
Python, I still don't think meaningful indentation is good.
Pierre
More information about the Python-list
mailing list