Python vs. C++ Builder - speed of development

Alex Martelli aleax at
Thu Jan 30 23:05:49 CET 2003

Brandon Van Every wrote:
> My contention is, if your approach is incremental and architectural,
> Python
> does not offer any amazing payoff over C++.  Python only gives you a big
> value add when you're trying to be more spontaneous.

Your contention is wrong as stated: _my_ approach IS "incremental and
architectural" more often than not, yet Python DOES enhance my
productivity enormously when compared with C++.  I've been _the_
C++ expert for my former employer for many years, taught C++ to
all other colleagues, etc -- it's not an issue of mastery of C++,
either.  It IS an issue of Python's magic.

>> I have noticed similar orders of magnitude in the productivity boost
>> that Python gives me (compared with, for example, C++ or Java) in
>> either case.
> Expertise, quality / badness of the design you're working with, and your

We're talking about the SAME designs (being transliterated for
example from Modula-2 to both C++ and Python; from C++ to both
Java and Python; etc).  Expertise (at the time) higher with
C++ than with either Java or Python.  So both factors are ruled out,
period -- and your contention remains simply wrong.

> level of control over the project are all factors here.  It's hard to

Same level of control over the project in both cases: one was a
personal project (total control), another a proprietary protocol
of the firm (zero control) -- in both cases the design was just
being "transliterated" (possibly as a first step for FUTURE
changes and refactorings).  Again, this factor is ruled out as
a possible explanation for any observed differences.

> compare apples to apples without looking at someone's project.  I guess in
> the end, you just try it out.  I wonder if people evaluate their positive
> experiences for the correct reasons though.

I'm careful to change just ONE factor when I try such things.

The ONE factor is: what language I'm transliterating into.

Other factors (the design, &c) are fixed.

Python proves very productive for this.  Roughly: transliterating
into Java yielded about 20% overall productivity gain wrt C++ (main
gain: no worry about "who owns what" and when to delete what; main
offsetting factor: Java lacks templates) -- too small to matter.

Transliterating into Python yielded about twice the productivity
wrt C++ (main gains: no worry about who owns what, no casts
needed, nested functions, everything works "template-like", i.e.
with signature-based polymorphism, without all of the syntax
cruft; only small cost, since PyChecker didn't exist at the time,
having to run the unit tests even to catch typos -- but that one
didn't have a measurable impact, 'twas just a small annoyance).

A productivity gain by a factor of two is large enough to
matter.  I have observed (under less strictly controlled
conditions) higher gains for "greenfield" projects, since
then the design can be more tailored to Python (appropriate
design patterns are for example quite different, depending
on what language you're targeting) _AND_ spiral/incremental
approaches are better supported.


More information about the Python-list mailing list