Why is python not written in C++ ?

Mithrandir mithrandiragainwiki at mailinator.com
Mon Aug 2 21:58:34 CEST 2010

Hash: SHA1

On 08/01/2010 07:34 PM, Albert Hopkins wrote:
> On Mon, 2010-08-02 at 01:08 +0200, candide wrote:
>> Python is an object oriented langage (OOL). The Python main 
>> implementation is written in pure and "old" C90. Is it for historical 
>> reasons?
>> C is not an OOL and C++ strongly is. I wonder if it wouldn't be more 
>> suitable to implement an OOL with another one.
>> Has it ever been planned to rewrite in C++ the historical implementation 
>> (of course in an object oriented design) ?
> Disclaimer: I am neither a C nor C++ programmer.  In fact I can barely
> even program in Python ;-)
> I would propose that in fact most programming languages are implemented
> in C.  Sun's (Oracle's) Java compiler and runtime are written in ANSI C.
> The core of the Gnu Compiler Collection (which includes C++ and
> Objective-C compilers) is written in C.  The official Ruby is
> implemented in C. The Squeak Smalltalk implementation uses C instead of
> C++.  I can't even think of a programming language that is implemented
> in C++ (maybe C++ is).
> C seems to be a good, portable language for writing interpreters and
> compilers.
> But I wonder if someone has/has tried to write a programming language in
> C++ and what were their experiences.

(Sorry if this is a double post, but apparently my last one didn't go

I know that LOLCode has a .NET implementation (1), although it's "very
much alpha."  And someone was apparently working on a C++ only
implementation of LOLCode (2), although that was 3 years ago.

LOLCode itself is very much alpha anyway and development seems to be
very slow (or dead.)

Python has a way of extending it's modules with C or C++ (3).

1: http://lolcode.com/implementations/lolcode.net
2: http://forum.lolcode.com/viewtopic.php?id=14
3: http://docs.python.org/release/2.5.2/ext/intro.html

- -- 
People should read more.
"All that is gold does not glitter,
not all those who wander are lost;
the old that is strong does not wither,
deep roots are not reached by the frost.
- From the ashes a fire shall be woken,
a light from the shadows shall spring;
renewed shall be blade that was broken,
the crownless again shall be king."
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Python-list mailing list