Subj : Re: What the bleep is Coupling? (was: Polymorphism sucks) To : comp.programming,comp.object From : topmind Date : Thu Jul 07 2005 02:38 pm Chris Sonnack wrote: > topmind writes: > > >> As A and B are coupled, changes to A require changes to B. > >> > >> The more decoupled they are, the less changes ripple thru the system. > > > > Okay, but how does polymorphism allegedly > > avoid this for ALL possible changes? > > No one I've heard has alleged this. Well, I don't know what the heck you are alleging. Even in the worse-case OO textbook "duplicate case/switch list" scenarios, a change to case list A does not necessarily "require" a change to case list B. List B may not care about the new option. What "required change" linkage is polymorphism preventing? Now you may allege that it is most likely that changes to case list A will result in a change to case list B, but that is not "requires". That is a statement of probability. (I may disagree with your probability value, but that's another issue right now.) "Requires" is a 100% probability. (BTW, there is some coupling and change pattern discussion also happening in the "OOP/OOD Design" topic.) -T- .