Why is python not written in C++ ?

John Bokma john at castleamber.com
Tue Aug 3 11:38:35 CEST 2010


Michael Torrie <torriem at gmail.com> writes:

> On 08/01/2010 07:09 PM, John Bokma wrote:
>>> One thing that comes to mind is that it's much easier to distribute C 
>>> libraries than C++ libraries.
>> 
>> In the beginning of C++ there were programs that just converted C++ to C
>> (frontends). At least that is how the C++ compiler Acorn sold worked.
>> So I don't think your argument was much true back then.
>
> No, he is still right.  Each C++ implementation did name mangling
> differently leading to "C" libraries that had incompatible names and
> signatures.  Also each frontend could have generated incompatible
> vtables and other C++ structures.  So C code generated by one C++
> frontend could not easily call C code generated by another C++ frontend.
>  So the same arguments that are made about C++ now were just as valid
> back then when C++ was merely a fancy preprocessor.

See my other post: I understand that two C++ preprocessors can't call
each others generated code, but if one uses C++ and knows that one can
only use shared C libraries on target systems, and not C++ libraries
that might be present (or more likely not: C++ was new in those days).

-- 
John Bokma                                                               j3b

Hacking & Hiking in Mexico -  http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development



More information about the Python-list mailing list