A modest indentation proposal

brueckd at tbye.com brueckd at tbye.com
Fri Nov 30 22:24:21 CET 2001

On Fri, 30 Nov 2001, Erann Gat wrote:

> > Yes, in theory, their
> > objection can cause problems. In practice, however, it rarely does.
> Rarely isn't good enough.

Sure it is, otherwise you've also just disqualified every other language
in existence. You said they also like C++. Well, the missing brackets in
C++ rarely causes bugs, but it happens, and in my experience the
indentation "problem" in Python happens even less often. By that standard,
C++ is less suitable for your mission-critical application. For C++ users
that are prone to that problem, the standard solution is to create a
coding standard that always requires braces. If you find yourself prone
to indentation problems in Python then create a coding standard that
always uses an end-block comment. In neither case does the compiler care.
In neither case is it required because the vast majority of the time it
doesn't cause problems.

>  The annals of catastrophic failures are
> chock-full of multi-million-dollar failures that were the result of things
> that "rarely" caused problems.

Perhaps, but you cannot now and will never find a total solution to that
problem in a computer language. The language can but help, and that's what
Python (and many other languages) do.

> > Right now you're essentially in the tough position of showing that Python
> > is perfect, which it's not, so you're bound to lose the argument.
> You misjudge the situation.  I like Python a lot, but I don't really have
> what you would call a passion for it.  (My passions run in other
> directions.)  What's happening here is that I see an opportunity for
> Python potentially expanding into a cool new market, but meeting
> resistance.  I see a way to overcome that resistance while at the same
> time IMO improving the language with minimal impact on existing
> infrastructure.

But as you agreed earlier, their objection is a nit-pick and their
reasoning (based on the fact that it's an "underdog") is irrational.
Those are two very bad reasons to change a language. ;-)

>  But I am not engaged in any argument with anyone, so I'm
> not "bound to lose."

Ok, not arguing, but "selling" as you put it, and you're obviously
interested in convincing them to buy into the idea of Python. My point was
that it's a pretty tough thing to do if you have to respond to such
nit-pick issues that they are dreaming up but don't have any real
experience with. You can just as easily come up with a nit-pick list for
any other choice of language, often a much longer list and with much more
meaningful concerns. You're trying to convince someone of this indentation
thing while they're partial to a language (C++) where you have to do your
own memory management?!?

> All I'm doing is bringing a problem and a suggestion
> for a solution to your attention for your consideration.

Not that I even have any say in whether or not the suggestion would ever
be considered, but we're talking about a problem that is so obscure in
practice as to make it essentially non-existent. In other words, the
payoff would, at best, be about zero because in practice the presence of
this characteristic of Python incurs about zero cost.

By their reasoning we should not use computers at all since it is possible
for them to lose power. We should not go to the store because it is
possible to get into an accident on the way. We should not breathe because
it is possible that the air is contaminated. These are all possible but
improbable events. In this specific case there is a nearly infinite list
of more probable sources of problems; your friends are concerned with
the wrong end of the list. :)


More information about the Python-list mailing list