[Tutor] Efficiency of Doxygen on Python vs C++?

Alan Gauld alan.gauld at btinternet.com
Fri Aug 17 19:24:59 CEST 2007


"Stephen McInerney" <spmcinerney at hotmail.com> wrote
>>lines to parse in a Python project,  typically only a third or a 
>>quarter of
>>the number of lines - sometimes less than that.
>
> Can you cite us a literature source for saying that Python is 3-4x 
> more
> expressive  per line-of-code than C++?

I don't have any literature to hand that gives those figures but in
Code Complete (Sec 3.5) Steve McConnell gives siome relatie figures
which indicates that TurboBasic is about twice as effective as C per 
line
and given my experience comparing Python to TurboBasic I'd figure
Python to be at east twice as effective as TB.

On the two projects that I have done comparisons with Java the
ratio has been about 3 times less code in Python - but both small
samples - less than 1000 lines of Java, 300+ lines of Python.
And my one comparison with C++ gave a 5 fold improvement
but is not a fair comparison since much of the C++ was
providing class equivalents for Python dictionaries, which I
know I could have bought if I'd looked hard enough.

I think there are some studies of SmallTalk productivity which
suggested that ST was around 5 times more effective than C,
and I'd guess Python was nearly as effective as ST. So that
kind of ties in too, but still based mainly on my experience
I'm afraid.

Not much help but something.

Alan G. 




More information about the Tutor mailing list