Python Productivity over C++

Christian Tanzer tanzer at swing.co.at
Fri Jun 9 02:45:21 EDT 2000


stevemul at ozemail.com.au (Steve Mullarkey) wrote:

> I have read in several places productivity claims of 5 to 10 times over
> 'C' and "C++". I would like to ask for some feedback from "C++"
> programmers who have moved to Python as to whether these estimates are
> realistic.
> 
> In "C++" I have :-
> 
> 1. Good tools, Borland C++ Builder, MS VC++, Memory Leak Tools,
> Profilers, Programmers Editor including Class Browser, etc..
> 
> 2. I use the STL (Standard Template Library) which gives powerful string
> and container classes.
> 
> 3. I use incremental compiling and linking. This reduces wait times to
> very small amounts.
> 
> 4. I can also use background compiling and linking.
> 
> 5. I have 3rd party libraries to handle Regular Expressions, Date/Time,
> etc..
> 
> I don't want to start a flame war but, given the above, I just can't see
> where the productivity increase is generated.

There are lots of reasons. The ones first springing to my mind are:

- The tools you mention notwithstanding, C++ still forces you to write
  lots of low-level code by hand (e.g., memory management, the
  `orthodox canonical class form').

- C++ doesn't offer any means of meta-programming. If you want to add
  some mechanism (like serialization, introspection, ...) to a class
  hierarchy, you'll have to add member functions to every class in the
  hierarchy. In Python you can implement the complete mechanism in the
  root class of the hierarchy.

- Incremental compiling/linking doesn't help when you need to refactor
  your product or want to add a mechanism to a class hierarchy. In
  that case, you might have to wait a long time for the product to be
  recompiled and linked. In Python, you might be able to pull the
  change into the running application.

- I could go on, but I have to leave for work...
 
> I am genuinely interested to ask "C++" programmers :-
> 
> 1. What productivity increase do you achieve ?

At least a factor of five if comparing C++ and Python.
 
> 2. How long did you use Python before you achieved increased
> productivity ?

Less than two weeks.

Regards,
Christian

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92





More information about the Python-list mailing list