[Prev][Next][Index][Thread]

Re: MI: why?



Actually, I somewhat understated the case against SI by forgetting to
elaborate how the effects build. You don't wind up just shoving a small
utility class to a certain level way up the hierarchy so that it can be
inherited across otherwise unrelated classes. You often wind up with
several such classes shoved up to the same level. So for instance as you
"better" factor the larger classes at the leaves, you wind up factoring
common sets of functionality into classes A, B and C. Now there may be
no class that needs all 3, but to get them to where they can be shared
as needed they must be moved up to same level, but of course they don't
have any actual relationship to each other. So now you have the
following equivalent choices for that piece of the hierarchy:

A->B->C
A->C->B
B->A->C
B->C->A
C->A->B
C->B->A

So with SI not only do you have problems locating and placing
functionality in the hierarchy, you have the problem that substantial
portions of the hierarchy may in fact be meaningless and you must figure
out whether B inherits from A in order to extend A or whether A is
actually totally unrelated to B and is just being inherited so that it
can be passed on down through the hierarchy to some other class that
really needs it.

SI forces into the hierarchy many relationships that have no real
meaning but are mere artifacts of the limitations of SI, thus adding
much confusion about what the "real" relationships are.



Follow-Ups: References: