Mark,
You are right. It is silly but more more importantly it severly limits the
ability to combine, in an articulate and elegant manner, functionally
orthogonal processing.
My take on the manner is that 'closed communities' tend to be intellectually
sterile (see summary statement).
In spite of the excellent professionalism of the C# programming community
and the significant contributions of C# (reflection, LINQ, EOP (Event
Observer Pattern)) the core decision making of C# architecture is very, very
small (God Bless Anders!!!).
The argument aganist C# MI (Multiple Iheritance) deals with complexity.
The complexity they speak of is mostly the implementation 'under the covers'
complexity. Of secondary import (in arguments aganist) is the supposed
'complexity' of expression (above the covers). I will drop 'under the covers'
issues and focus on the 'above the covers' issue of WHY (IMHO) MI (multiple
Inheritance) as been rejected by the closed community.
Q. WHY is MI not in C#?
A. Expression complexity
Expression complexity (for lack of a better term) is a most shallow argument
aganist the inclusion of multiple inheritance. When I say 'expression
complexity' I DO NOT MEAN a 30 line contrived example. I mean the 'expressive
complexity' on the order of millons of lines of code, similar in scope to
Lord of the Rings and Sherlock Holmes (If you can't make the leap don't read
further).
Currently in C# we divide and conquer complexity by (1) stratification in
(A) call levels and (B) inheritance. So complexity can be 'layered' from L1
to Ln. Single inheritance can be fitted to the concept of just being another
layer - Li.
In C++ we also have multiple inheritance to divide and conquer complexity by
(2) functionally orthogonal articulation. Thus any Lx (level of
stratifaction) can contain F1 to Fn. So a single class 'inherits' F1 to Fn as
multiple classes via MI. Now the derived class can call embedded classes (the
next LX) and also call or provide (to a caller) F1 to Fn.
SI as Li VS MI as F1 - FN is the core 'sticking point' that divides the
FOR/AGANIST campes.
WHY : THOSE OPPOSED TO C# MI : They say an Lx with F1 -> Fx is to complex.
Their summary statements always say something like 'not worth it' meaning it
brings in more problems than not.
I would tend to agree if every Lx (Level of stratification) had a functional
break out (More than one Fx via more than one parent class via MI). BUT -
IMHO - only 10 to 30 % (a hip shot I admit) of levels in a 'real world'
design have a 'functional breakout'. So I think that MI for functional
decomposition is hetrogenous (and clustered on a few key levels a real world
component design) and not homogenous.
I love MI (Multiple Inheritance). It ONLY simplifies things (above the
covers). More importantly, I believe that a simple implementation (under the
covers) is inherently doable (if I wrote the compiler - I love saying that!
:-). But the core dev team of C# does not (so much for MHO :-)
[BTW - Pipelining and OOA (Object Oriented Approach) do not result in a
'single top node' simplification via language feature sets. Multiple
inheritance, for example, is a code element mechanism that formally produces
a functional focal point (the derived class access and 'pass through' of
multiply inherited function).]
I have the deepest respect and admiration for the Anders/C#Community of
thougth. But I truly believe another solution, post C#, will fill the
programming void of the future caused by this significant and unfortunate
expressive hole (in the fundamental C# architecture).
I think the 'intellectual sterility' (flame me please - I'm asking for it
:-O) resides in the tendency to determine everything (language feature wise)
in a 30 to 40 line contrived example IN C#.
As Einstein said you have to go at least one level 'above' something to talk
about it. So system level arguments (Lx + FX combined as a single point
(classs) via MI) do not carry much weight because they are 'above' that 30 to
40 line intellectual prison of many core community members (MVPs, etc).
So -IMHO - the 'closed community' is formed by the 30 to 40 line mindset.
Like Republican/Democrat dialogs your 'camp' is defined by your values and
comfort zone. Its always nice to know I'm not alone in my 'camp'.
Good luck to you Mark. It's (also) always nice to know someone else is
sharing my pain :-)
shawnk
PS. It always feels 'so good' to get this off my chest. Thanks for the
opportunity.
"Mark" wrote:
why doesn't .NET support multiple inheritance?
I think it's so silly!
Cheers,
Mark