
On Sat, Aug 24, 2002, Guido van Rossum wrote:
Why do keep arguing for inheritance? (a) the need to deny inheritance from an interface, while essential, is relatively rare IMO, and in *most* cases the inheritance rules work just fine; (b) having two separate but similar mechanisms makes the language larger.
For example, if we ever are going to add argument type declarations to Python, it will probably look like this:
def foo(a: classA, b: classB): ...body...
I'm curious, and I don't recall having seen anything about this: why wouldn't we simply use attributes to hold this information, like __slots__? After all, attributes get inherited, too, and there's no need to pretzel the syntax. Using attributes IMO would make it easier to handle the case where derived classes need to mangle type and interface declarations. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ Project Vote Smart: http://www.vote-smart.org/