Re: WHY PYTHON?

Guido van Rossum (Guido.van.Rossum@cwi.nl)
Mon, 09 Dec 91 10:54:53 +0100

Mats Lidell writes:
>In an OO prototyping language, OOPL (?), the natural language to
>connect to wouldn't be C but C++. A OOPL object could then be a thin
>wrapper around the C++ object and of course you would like to be able
>to make C++ code access OOPL objects as well.

If all OO languages were the more or less equivalent except for minor
syntactic issues, this would be a reqsonable assumption. However, as
it is, this would make the OO model of the wrapper basically the same
as that of the language it is wrapping. I don't think you would want
Python's OO mechanisms too tightly bound to those of C++.

While the same reasoning could be applied to Python's reliance on C
for its non-OO features, I believe that at least the features from C
that I have borrowed for Python are much less controversial.

But the true reason why Python isn't based on C++ is of course
availability -- requiring C++ would initially restrict Python's
popularity mostly to the C++ community, for very practical reasons
like the availability of C++ compilers (and there is a lot of
incompatibility in that world as well!).

>Does anybody know of
>some work in this direction? (Is it to weird to consider or is it in
>Python already? :-))

There's no reason why some extension modules of Python couldn't be
written using C++, but of course this isn't the same as what you proposed.

--Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
"That was never five minutes just now!"
"I'm afraid it was."