Why is python not written in C++ ?

Ulrich Eckhardt eckhardt at satorlaser.com
Tue Aug 10 03:06:49 EDT 2010


Carl Banks wrote:
> I highly doubt the Python source would build with a C++ compiler.

As Christian showed, it doesn't. However, look around the sources a bit.
There are lots of places where e.g. the returnvalue of malloc() (or,
rather, the macro that resolves to something like it) is explicitly
type-cast to the according pointer type. When asked on the developers'
list, it was said that this was intended for compatibility with C++, e.g.
in cases where people want to embed Python into their C++ projects. Of
course, this contradicts Christian's statement that C++ compatibility
wasn't considered useful enough.

*shrug*


Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932




More information about the Python-list mailing list