Python indentation deters newbies?

CptPicard jpmorichon at earthlink.net
Fri Aug 13 12:44:42 EDT 2004


"Peter Hansen" <peter at engcorp.com> wrote in message
news:Uf6dnb0hhtx1ToHcRVn-vg at powergate.ca...
> beliavsky at aol.com wrote:
>
> > One of the most commmon reasons programmers cite for not trying Python
> > is that indentation determines the program flow -- they think its
> > weird. I think programmers who actually try Python adapt quickly and
> > do not find the indentation rules to be a problem.
>
> I think you're right on both counts.  For me, the adaptation
> period was roughly ten seconds...
>
> > I wonder if there is a way to remove this initial barrier.
>
> Why?  Is there really any evidence that the Python community
> is missing a large number of really excellent programmers merely
> because they are resistant to the idea of syntactically significant
> indentation?  Yes, it's one of the most common reasons programmers
> cite as you note above, but in absolute terms I doubt it's that
> significant.

That's true.
As the question is formulated, I don't think that a programmer will be
stopped by the indentation syntax. There are so many languages with very
strange syntax : we adopt them because they are efficient in what they are
doing and are adaptated to our problems.
But on a first approach, if you know that several languages could fix your
problem, you may tend to choose the one you prefer regarding several
criteria like ... syntax.
And for me, the problem could be here: on a quick analysis, people may
prefer Perl to Python (for example ;-) ) just because it looks like that
they are doing the same thing and Perl syntax may look more appealing (not
talking about regular expressions here). And once you are engaged in
learning a language, you tend to think twice before learning another one.
And the main question becomes : what Python will bring to me so that I stop
working on my current language and learn about Python ?
So I don't think that it is a problem of laziness or of being closed minded.

Note: I assume here that people have the choice to choose their programming
languages.

I noticed too that, amazingly, a lot of programmers know about Perl but not
Python.

>
> > I'm not saying that Python's use of indentation is bad, just that it
> > stops many programmers from trying it.
>
> I really question whether we are looking for such programmers.
> They sound rather close minded and perhaps even lazy...
>
> -Peter





More information about the Python-list mailing list