source code size metric: Python and modern C++

David Abrahams dave at boost-consulting.com
Tue Dec 3 10:58:18 EST 2002


pavel_vozenilek at yahoo.co.uk (Pavel Vozenilek) writes:

> Neal Norwitz <neal at metaslash.com> wrote in message news:<pan.2002.12.02.03.44.36.314421.12688 at metaslash.com>...
>> On Sun, 01 Dec 2002 21:09:28 -0500, Pavel Vozenilek wrote:
>>
> [snip] 
>> http://www.metaslash.com/brochure/recall.html
>> 
>> This is a real world example of an open source project.
>> Short answer for the lazy:
>> 
>>                Main Code  Support Code   Example's Code
>> C++               4988         3105          2573
>> Python and IDL    1858            0           659
>> 
>> In sum (2517 for Python vs. 10666 for C++), that's a factor of over 4.
>>
> Thanks for the link - it contains the information I was interested.
>
>
> Looking over the code example, I think the C++ version is
> unnecessarily verbose (but didn't try with real compiler though):
>
> 1) Boost contains lambda-like library that could replace whole struct
> Compare with 'inline function', like in Python. (The library is quite
> new - available for some 1/2 year on Boost.)

Actually that library has a fairly long history, but was only recently
"boost-ified", submitted for review, and accepted there.

-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution



More information about the Python-list mailing list