>>I'd agree, but add that the mis-use of polymorphism is right up there too.
>
>A very interesting comment.. Could you go into this a bit further? Specifically, how can polymorphism by mis used??
>
>Thanks...
Hiya JVP,
It's tough to sum up without going into a long theorethical discussion, but it's sort of like the "square peg, round hole" concept. In this case, it's more like "round peg, octagon hole". To be brief, there's one situation or problem that is similar, but in some respects very different, to another. Trying to make an existing object (or solution) fit this is what I was getting at.
More than anything else, I've viewed polymorphism from the point of "extending" behaviors, more than modifying them.
From my POV, the key is in the definition. It doesn't take much to see that computers themselves rely heavily on this. The bit or switch is either set (opened) or it isn't (closed). The continual recursive definition of this, is what makes them work.
Similarly, the more tightly we define an object's behavior, the (and I hate to quantify it this way) "better". When we start to stray from that, by mis-using or in the name of polymorphism, the more we can get into problems.
Does that explain it?
George
Ubi caritas et amor, deus ibi est