Python was designed (was Re: Multi-threading in Python vs Java)

Chris Angelico rosuav at gmail.com
Wed Oct 16 16:40:32 EDT 2013


On Thu, Oct 17, 2013 at 5:49 AM, Skip Montanaro <skip at pobox.com> wrote:
>>> Who uses "object abstraction" in C?  No one.  That's why C++ was invented.
>>
>> I wonder if you've heard of something called linux?
>> http://lwn.net/Articles/444910/
>
> If not, Linux, how about Python?
>
> http://hg.python.org/cpython/file/e2a411a429d6/Objects

Or huge slabs of the OS/2 Presentation Manager, which is entirely
object oriented and mostly C. It's done with SOM, so it's possible to
subclass someone else's object using a completely different language.
Makes for a lot of boilerplate in the source code, but it works. You
can even - often without the different subclasses being aware of each
other - have two or more unrelated modules each subclass-and-replace a
standard class like WPFolder (which represents a folder, usually
backed by a directory on disk) to modify its behaviour.

Yep, definitely possible to write OO code in C.

ChrisA



More information about the Python-list mailing list