Just my opinion - Multiple inheritance in C++ was nothing but a pain in the
booty. I am glad C# didn't allow it. Although, I believe they were trying to
make a language not as difficult / lower entry level than C++. Another such
language is Java. It has 99.9999% of what you need, and only leaves the
complex parts out. IMHO that's sensible - it leads to better code and
cheaper programmers.
Specifically what problems could Multiple Inheritance cause in .NET. .NET
has somethign called as 'fixed object reference' that is - object references
to the one object in refer to same pointer value regardless of the type that
the reference is being interpreted as. For multiple inheritance, you would
loose that and along with you would loose all base type
interpretations/castings to base types. Secondly, you would loose all highly
efficient pointer comparisons. Yes you have the unsafe block, but who uses
it anyway when it says in red lettering "unsafe" (I had totally forgotten
about "unsafe", until I was reminded of it in these groups). But, shallow
cloning, equality reference etc. none would be as straightforward if you
didn't have fixed object references. Also, for all practical purposes that
MI can be used for, interfaces can do the same, albeit with too many vtable
jumps (3 compared to 1) so it is not as efficient .. but for cleaner code
and better readability, I can live with that.
- Sahil Malik
Independent Consultant
You can reach me thru my blog -
http://dotnetjunkies.com/WebLog/sahilmalik/