Saad,
The following is an opinionated synopsis of 'why MI' as well
a very brief history on what happened to MI in 'modern' (ahem!)
languages such as Java and C#.
[1] The Functional Structure of a computing Expression medium (Logical
English, C, Java, etc).
SFM (Strategic Functional Migration) is the process of normalizing a code
base.
A fully (functionally) normalized code base has no 'diamond' structures within
the fabric of inheritance. Just like a fully normalized database has no
replicated data, a fully normalized code base has no replicated functionality.
Note : Our good friend Jon Skeet (God bless him

might suggest that the
normalization could be accomplished via the sequential effects of composition.
Normalization being the removal of replicated functionality. The
normalization
I speak of is a structural normalization of function that controls the
structural accessibility and containment of function.
Functional normalization is a structural aggregation phenomena not directly
related to compositional issues/problems/solutions.
In this context (structural aggregation of function - ie. inheritance) two
visualizations are used to understand the problem of distributing state space
along lines of inheritance. The visualizations are 'diamond' and 'fans'.
What are 'fans'.
In a normalized code base, instead of Diamonds you have 'fans' - Radial
lines of
inheritance.
In a stratified visual diagram the 'fans' are going from the top
(derived/child
classes) to the bottom (base/parent classes). This is the self-centric
viewpoint of children. Each child has its own functional 'viewpoint'
defined by
its 'lines of inheritance'. Many children, on the top, can have lines
extending
to (and thus incorporating) the parents.
In a circular visual diagram each individual base class (parent) is in the
center of its own circle 'looking out' towards all children (derived classes)
that inherit it (a self-centric subjective viewpoint of the parent class).
The functional 'computing fabric' formed by 'fans' is orthogonal in that no
lines 'touch'.
If two children have replicated function OR if the same function is desired
in more that one child then the function can be moved out from the children
to a base class and then incorporated back into the children via MI.
Note : Function ALWAYS includes operations (operators, etc) and state space
(numbers, strings, flags, etc).
Case in point. I have a child, it has a handy function I want to use it 'over
here', so I break it out, make a base class, bring into both targets via MI
and
'Wa La' I'm done
Again, this is a fully normalized code base, no diamond structures.
[2] History of MI (super short version
In the beginning C was 'free form' computing with an expression medium
incorporating very little restrictions. C++ introduced functional containment
whose object oriented approach allows the computing fabric to have a
'rigidity'
formed by specifications (public/private/protected - MI) which articulated a
more refined and accurate implementation of the designers orignal intentions.
Java, followed by C#, removed the primary normalization mechanism - MI - from
the structural matrix of the computing fabric. The result being that the
radial
lines of functionality (fans as defined above) where no longer structurally
possible. Note : Structurally possible as a structural aggregation phenomena.
It was suggested/proposed/championed that using sequential functional
composition
(calling a sequence of functions similar to commutativity in mathematics)
could
replace the design utility of MI. This only confused the intellectual
landscape
of the design medium by removing 'fans' and replacing them with 'call
sequences'.
In real world programming call sequences ARE more verbose (from an information
theory point of view) complex and confusing. Why? Well, its simple - no
CENTRAL SPECIFICATION MECHANISM exists to define a sequence of calls as a
functional unit (an interesting thought). This would logically cast the
'process' as an apparently dynamic phenomena without the static costs/problems
of state space.
Class is a functional unit (structural aggregation). MI defined a structural
aggregation of function to create functional units without code replication.
Call sequence is free form (compositional effects). A method in one class
does
not define a functional unit as in a process definition from a sequence of
steps
with the design result being a callable process as an architectural
expression.
(a purely dynamic functional unit by the way).
The functional linkage of call structures is unique to each code base. It has
no ability to force the structural design of another code base. To state that
the use of a call sequence in runtime (as a compositional device in time) is
suddenly a structural design phenomena in space is a circular argument that
misses the point. A sequent of component activity is a valid, complementary,
AND FUNDAMENTALLY DIFFERENT phenomena from structural aggregation. Wheather
such a sequent can be architectually defined and reused is orthogonal and
immaterial to the complementary nature of compositon/aggregation.
Replacing structural aggregation with compositional effects is like saying
a business needs 'three people', an engineer, an accountant and a salesman.
Our company (ie. my design) will use two engineers and an accountant and we'll
be good to go!!! (no cash flow today
During the C++/MI to C#/SI-Interface period the 'sequence in time' va
'aggregation in space' approaches were explored, understood and formally
defined
(as in WikiPedia).
During that time NO LANDMARK logical/metric analysis was performed in the
programming community to define functional normalization, articulate
structural
aggregation and compare the complexities of sequential composition in time to
the structural aggregation in space (Landmark being - oh yeah, now we ALL
understand MI).
The result being that a generation of programmers was indoctrinated into a
design approach that lacked a clear understanding of functional normalization
and the concept of functional orthogonality within a code base.
The inherent balance of composition/aggregation has also proven elusive since
many 'so called experts' can not see beyond the diamond problem to a computing
universe wherein functional normalization is the 'stable state' of the
architectural expressions.
MI proponents believe that 'forced code replication' is an inherent result of
not being able to fully normalize a code base.
At present, and within the cultural context of the programming community,
the degradation of the structural computing fabric due to lack of MI
is a 'de-evolution' towards the problems in the C language without the
necessary freedom/power (due to Java/C# type restrictions) to overcome
those problems.
Fast forward to today.
[3] Summary of a very opinionated dissertation
No body has time anymore....
Since we all have schedules, dead lines and prior commitments many talented
people have been unable (practically) to prove the MI/SI-Interface debate
from a
scientific-inquiry/terminology-metric point of view. If this was done Jon,
Radek, I and others would have enumerated the top three metrics (numerics)
proving our logical positions.
Fortunately forums such as this can funnel ideas to WikiPedia where
the foundations for such inquiries can have a solid consensus that
leverages the best of the communities efforts in advancing the state
of our art (computing).
If you understand database normalization and data replication you
will have a fundamental understanding of functional normalization
and code replication.
This community dialog on SFM (Strategic Functional Migration) has been quite
helpful in getting excellent input (Radek Cerny - functional normalization) to
better articulate the differences between composition and aggregation.
I hope the above is helpful to you (and hopefully others) in coming to a
better
understanding of the utility of MI and its use as a structural aggregant for
the
functional normalization of an architectural expression.
Thank you so much for your thoughtful questions and comments.
Shawnk
PS. The 'strategic' in SFM emphasizes the refactoring of a code base to
remove
all diamond structures or to change an existing normalized code base and still
retain a normalized state.
PPS. Please do not interpret any of this (the history) as a pejorative polemic
to pound MI into the brains of SI-Interface proponents. This is an attempt to
refine the articulation of the MI/SI-Interface debate. The hope being to move
our various opinions towards scientific inquiry and logical/metric analysis.
PPPS. The greatest cost/work of SFM in terms of intellectual energy is the
refactoring of any 'diamonds' into a set of 'fan downs' and 'fan ups'. In 14
years of C++ coding I never had a 'diamond' except once and I just factored it
out. I did have the luxury of doing my own architecture and design however.
To replicate the SFM process consistently in a corporate code base
with millions of lines of code from thousands of programmers is another
matter. Thus the need for a more stringent approach via a formal
analysis.
PPPPS. Also I have no problem with allowing diamonds to exist since (IMHO)
the permutations of state space collisions are well known. I would
allow all permutations to exist (architecturally) for the programmer,
choose a syntax spec default and allow a syntax mechansim to change
the default both globally and specifically.
This allows the freedom of non-normalized functionally while retaining
the precise articulation nessary to reflect the intentions of the designer
in the expression medium.