Object-based inheritance in Python

Hung Jung Lu hungjunglu at yahoo.com
Fri Jan 9 14:46:23 EST 2004


Stephan Diehl <stephan.diehlNOSPAM at gmx.net> wrote in message news:<btm4mo$qpt$06$1 at news.t-online.com>...
> Tobias Windeln wrote:
> > 
> > I'm looking for suggestions on object-based inheritance
> > in Python. Automatic forwarding (often called delegation)
> > in Python is easy:
> > 
> 
> Have a look at Hans Nowaks 'selfish' implementation:
> http://zephyrfalcon.org/download/selfish-0.4.2.zip
> 
> This is a pythonesque interpretation of the 'self' language by Sun.
> By the way, if you are googling, you want probably look for 'prototype based
> languages'.

Seems like prototype-based languages are catching up the attention of
people. I have looked at them recently. My feeling is that somehow
main development stopped around 1997. I have looked at Io (I know it's
born in 2002, but the ideas come from before), but I just get the
feeling that Io is not "clean" enough. Anyway, I think that instead of
designing final languages, it's a better idea to make *prototype*
languages (sorry for the pun) and experiment with various features.
One problem I've seen in Io is that they started to write software,
when the language itself is not well-defined yet. And so, you make
changes to the language, and you have to make corrections to large
body of existing code. And, also, once too much code is written with
existing language, it becomes really hard to make language changes
later: too much work to update legacy packages.

There are a few problems with current programming languages that only
come to bite you at large scale projects (Multiple Inheritance,
Metaprogramming, AOP, Multiple Version handling,
Transactional/Incremental programming with real-time rollback/undo,
ideas from Functional languages, etc.) And my experience has been that
the more complex your project becomes, the more you wish you had a
simple, clean, solid, powerful theoretical foundation for your
programming language. Prototype-based seems the right direction to go,
but I am kind of disappointed at all existing prototype-based
languages out there. Somehow something happened in 1997 that stopped
research in this direction. And now the prototype-based languages seem
so much behind. It's like time has been frozen for 6 years.

regards,

Hung Jung



More information about the Python-list mailing list