[Types-sig] Why have two hierarchies? (*EUREKA!*)

John Skaller skaller@maxtal.com.au
Sun, 06 Dec 1998 10:36:14 +1000

At 14:42 5/12/98 +0100, Just van Rossum wrote:
>Here's one additional remark that I forgot to put in the article.
>The meta classes issue comes from this question:
>    If an object has a class (a __class__ attribute), the what is
>    the class of the object's class?
>My (current ;-) solution to this infinite recursion can be summarized thusly:
>Today, instances have a __class__, and classes have base classes. Instead
>of adding a __class__ attribute to classes, we should get rid of the
>__class__ attribute of instances and give them __bases__ instead. So
>instead of _adding_ a layer of complexity (meta classes) I _remove_ one.
>Python today:
>    instance.__class__.__bases__
>I suggest:
>    instance.__bases__
>Ok, enough already. Let the hangman come!

        This is a very powerful argument.
It seems to me that additional abstaction can only
come from simplifiction. A 'just' justification :-)

        Also, such a simplification, to be truly
worthy, must provide _unexpected_ new functionality.

        Now .. doesn't this scheme look a bit like
supporting delegation ..??

John Skaller    email: skaller@maxtal.com.au
		phone: 61-2-96600850
		snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia