Regular expression code implementation review between Tcl vs Python
Alex Martelli
aleax at aleax.it
Thu Nov 13 13:12:05 EST 2003
Bernard Delmée wrote:
>> _Some_ OS projects, such as Mozilla or KDE, appear to thrive on C++,
> > I believe, and enforce SOME subsetting effectively.
>
> In the case of Mozilla, some guidelines are available at
> http://www.mozilla.org/hacking/portable-cpp.html
> I don't know whether this is still enforced, since this document is 5
> years old. And it shows: no templates allowed (hence no STL), no
> exceptions, no RTTI... Phew! Must be very frustrating to follow, but if
> such is the price of portability...
Right -- still, it froze me solid of any inkling of joining the
mozilla team (I wouldn't mind "no RTTI", but...:-).
> Also, using C++ for implementing scripting languages complicates
> interfacing to extensions in the form of dynamic libraries, because of
> the various name-mangling schemes different compilers use. How does
> boost solve that problem, btw?
A Python extension module just exposes "initmyname", it's not hard
to define that one as extern "C". And the Python headers are careful
to always wrap extern "C" ( ... } around everything if you use C++.
So, NP.
Alex
More information about the Python-list
mailing list