Python Productivity Gain?

beliavsky at aol.com beliavsky at aol.com
Wed Feb 18 16:26:59 EST 2004


"kbass" <kbass at midsouth.rr.com> wrote in message news:<LaBXb.8774$g95.1612 at fe3.columbus.rr.com>...
> In different articles that I have read, persons have constantly eluded to
> the productivity gains of Python. One person stated that Python's
> productivity gain was 5 to 10 times over Java in some in some cases. The
> strange thing that I have noticed is that there were no examples of this
> productivity gain (i.e., projects, programs, etc.,...).  Can someone give me
> some real life examples of productivity gains using Python as opposed other
> programming languages.
> 
> From my our personal experience, I have been programming with Python for
> about 6 months (but I have been programming in other languages for over 10
> years) and I have noticed that the more I had gotten use to programming in
> Python, the more my programming speed has increased. But ... this is true
> with any language that you program in as long as you are learning the
> methodologies and concepts of the programming language.  Your thoughts.
> 
> Kevin

My main other language is Fortran 95. For simple text analysis or
"database" programming (sorting a list, merging two lists etc.),
programming in Python is much faster, since more functionality is
built-in and the code is generic. If you write a sorting routine in
Python, it will work for lists with any type of elements (int's,
real's etc).

For numerical work, I still prefer Fortran 95 to Numeric Python.
Genericity is not as important here, and in any case a single Fortran
95 code can be written to do a calculation in single, double, or
quadruple precision, using the KIND feature. Fortran 95, properly
used, is safer than Python, because (for example)
1. function interfaces are checked at compile time
2. constants can be declared
3. the DO loop is more restrictive -- the looping variable cannot be
changed inside the loop

Well-written numerical F95 code is clearer to me than comparable
Python code because one can specify what input arguments of a function
will not be changed (using the INTENT(IN) feature) and what the
dimensions of all arguments are. It's also clear from reading the
declarations what the function is returning, whereas a Python function
can return anything, depending on how it is executed.

There are several independent implementations of languages like C++
and Fortran on both Linux and Windows. I don't think this is true for
Python. They create stand-alone executables that don't require an
interpreter on the target computer. Their language committees are
unlikely to make changes that break old code, as the prospective
change in Python's integer division will do.

I do like Python, but no language is a panacea. I think Python should
add some OPTIONAL safety features.



More information about the Python-list mailing list