not safe at all

Peter Hansen peter at engcorp.com
Fri Jul 13 23:16:03 EDT 2001


Tim Daneliuk wrote:
> 
> Dennis Roark wrote:
> > misuse 500 lines later in the program.  My original note was
> > not intended to be an indictment of Python, but only to
> > bring up some reasons that for me make more strongly typed
> > languages like C++ or Object Pascal better at coding very
> > large projects.

As others have noted, your lack of experience attempting
to implement a large application in Python reduce the value of
this statement.  Nevertheless, your sentiment is echoed 
repeatedly by many (which doesn't make it any truer) and so we
seem to be compelled to respond. :)  In the following, wherever
"you" appears, please consider it the impersonal "you" applied to
anyone who might make statements like the above.

> I have programmed extensively in C, assembler, BASIC, PL/M and a some
> in C++, Forth, Pascal, AWK, Perl, Java...  For my money, I have *never*
> seen a language more suited for rapid applications development - even
> pretty good sized applications - that strongly encourages the programmer
> to write clean, easy to read code, than *Python* - this after only a
> month or two of fiddling with it.
[...]
> Furthermore, bear in mind that code "portability" is no where near as
> important in the commercial sector as it is in academics.  [...]
> What *is* important is code *reliability*, *cost of
> ownership*, *readability*, and portability of *programmer's skills*.

All very true.

I can attest from personal experience with Python over the last year 
and a half (to strengthen Tim's claim from only a month or two of use) 
that Tim's statements above are *absolutely* on the mark for 
commercial developments.

I've programmed seriously for about 23 years.  I too have used a
gazillion languages.  I've personally written, architected, or
managed development of large applications in C, C++, Java, Object
Pascal, LabVIEW (>shudder<) and now Python.  I'm an engineer, not 
a computer scientist, which might mean I'm more interested in 
pragmatism than theory (not trying to be denigrating there).
(Don't flame me for saying this... some people like a little
background material to help evaluate someone's claims...)

My experience convinces me Tim is exactly right:

The most important thing about the product is *reliability*.

The most important thing about the source is *maintainability*.

Python ranks higher than any of the other languages I mentioned,
based on direct observation and lengthy consideration, in both
those areas.  

It is also more productive in general ("cost of ownership") 
by a factor of at least two (I'm being conservative).

My programmers (team of 16) uniformly like Python, find it
more "fun" than any previous language they've used, and produce
better results with it (as measured by any of the above 
measures, and by the fact that I can understand their code 
easily).

Only one of them had even heard of it prior to the first 
interview.  None of them took more than about a week to begin
contributing to our development, and I believe each was,
after less than a month of active use, more effective with
Python than with his or her previous "best" language.

I'll note also that I make these claims even before we've 
fully implemented extensive automated testing along the lines
of what people in this group generally claim is "essential".

(I don't disagree with that claim, but even as we implement
such processes -- prior to our code releases -- I am seeing
very significant improvements over what I have seen in the
past with other languages.)

In other words, *even without testing Python leads to fewer bugs*.

You can say that's not possible.  You can disbelieve it.
You can insist you need stronger typing.  You can claim 
that, because of your own special, unique situation or
for personal reasons it just somehow isn't true.

I say you are probably wrong.  Or at least, until you give 
Python a fair try on a large application, you won't convince 
me otherwise based on theoretical arguments.

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list