A modest indentation proposal
gat at jpl.nasa.gov
Fri Nov 30 23:35:41 CET 2001
In article <mailman.1007156921.816.python-list at python.org>,
<brueckd at tbye.com> wrote:
> 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++.
Yes, but it's important to understand *why* they like C++. They like C++
because "everyone uses it." That fact alone can overcome nearly any
technical objection. In the case of Python it is not the case that
"everyone uses it." I haven't actually tried (because I could not live
with myself if I succeeded) but I strongly suspect that I'd have a much
easier time convincing people to fly Perl than I would to fly Python.
> By that standard,
> C++ is less suitable for your mission-critical application.
That's right. I actually believe that C++ is even less suitable for
mission critical applications than Python. But my opinion is irrelevant
because I'm not the one making these decisions.
> 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.
That is in fact precisely what I am trying to do, except that I find
end-block comments too verbose and I want to use something shorter.
(Also, I want an editor mode to support this convention, and I'm not much
of an elisp hacker.)
> > 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.
I never said any different.
> 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. ;-)
That depends on one's goal. My goal is to convince the Powers that Be
here to let me write flight software in Python instead of C++. If a tiny,
inconsequential change to the language lets me accomplish that then I
think it's an excellent reason to change the language. BTW, I'm not
really asking for a change in the language, just a semi-official adoption
of a convention. Remember, there's a lot of herd-mentality reasoning
going on here. I could pitch my solution purely internally, but then it
would be "Erann's hack", which makes it bad. (Look at the reaction I'm
getting here.) If I can convince the Python community to adopt this first
then I can pitch it here as the *community's* solution to the problem,
which makes the herd mentality work in my favor.
> 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?!?
Yes, I see you are beginning to understand. Fortunately, in this case the
list of nit-pick issues seems to be rather short. There's not a whole
laundry list of issues, just this one. Unfortunately, it seems to be a
potential show stopper.
> Not that I even have any say in whether or not the suggestion would ever
> be considered,
Oh, but you *do* have a say because the people who make the decisions here
listen to you. Not directly, of course, they listen to the "buzz", and
you (and everyone reading this group) are part of the buzz. And the
people who read this group are influenced by what you say.
> 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. :)
No, by their reasoning they should use computers because everyone uses
computers. They should use C++ because everyone uses C++. Should they
use Python? Well, very few people seem to use it (relatively speaking),
but it seems basically OK, kind of like Perl, which everyone uses and that
makes it OK, but it's got that weird indentation thing going on, and that
makes it suspect.
Now from here on how the story goes is up to you. If you simply insist
that the problem doesn't exist you will lose, at least in the short run,
because for the moment "they" *just know* that it's a problem (in much the
same way that they *just know* that C++ *isn't* a problem). If, on the
other hand, you can show that the community recognizes the problem and has
a solution then you win. You are the community. It's up to you.
More information about the Python-list