SV: Python Productivity over C++

Max Møller Rasmussen maxm at normik.dk
Tue Jun 13 06:59:09 EDT 2000


Fra: Ken Seehof [mailto:kens at sightreader.com]

>When I code in C++ or python, I spend most of my time testing and
debugging,
>so the question is: How does python save time on debugging?

I believe that many factors is in play when considering how long time it
takes coding in C/C++ vs. Python.

C/C++ is probably more error prone due to memory managment and pointers this
should make Python faster in itself.

But consider what happens if you find a design flaw in your code and you
have to refactor  all of it. Shorter code will be faster to refactor.
Shorter code will probably also have fewer design flaws.

This leads to a quadratic growth in refactoring time for longer code.
Roughly:

Twice as long code -> Twice as many design faults to refactor (Perhaps even
more).
Twice as long code -> Twice as long refactoring time.

I know that this is oversimplification, and that object oriented programming
should make it unnessecary to refactor all the code, but I do believe that
it is very close to the truth. The difference in productivity should be
problem^2 for C/C++ as compared to Python.

The theory can be tested by writing really long programs in both Python and
C/C++.

:-)

There should be a really HUGE difference in productivity for the Python
programmer as Python is a much easier language to design in.

Max M




More information about the Python-list mailing list