Multiple inheritance in Java/C#

Thomas pushcold at hotpop.foo
Wed Nov 19 09:55:28 EST 2003


On Tue, 18 Nov 2003 20:31:35 -0800, Hung Jung Lu wrote:
> I think Microsoft did look into Python when they designed C#.

I had the same feeling.


> However, they followed Java in avoiding multiple inheritance (MI),
> which is a great leap backward from C++, in my opinion. 

There are pros and cons for MI; I never liked the MI design (e.g.
because it can lead to nasty bugs, which are really hard to find)
and prefer C#'s way.


> But the cure (using interfaces) seems worse than the disease 
> itself. Now if you change an interface, you have to go and 
> change all classes that use the interface.
>
> Standard reply is a cold sholder: "interfaces are not meant 
> to be changed". But we live in the real world.

At least, the compiler tells you exactly what to do; in my 
experience, this leads to very stable applications, even if the
application gets very large. (If you work with MI, it might happen
as well that you have to change many classes when you make changes
to the base classes.)

I hope that C# uses it's chance of being a (IMHO) well designed
language, which can concentrate now on performance and stability
issues (and not on implementing new features). Python used to be
that way, but in the last time, it is developing too fast (IMHO).

-- 
mailto: pushcold at hotpop.foo (where: foo = com)





More information about the Python-list mailing list