Re: Poly Couples
- From: Bruno Desthuilliers <bdesth.quelquechose@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 07 Jul 2006 22:57:06 +0200
topmind a écrit :
(snip)
> IF statements are simply more bendable and flexible to handle real-world
changes. You can refine them without moving lots of code around.
But not without modifying existing code. And in a lot of cases modifying it in *many* places. What polymorphism brings is mainly using another way of doing the dispatch that doesn't require explicit branching - so it doesn't require modification of the calling code. This is of course not enough to isolate all code of all possible change, but it's still a pretty useful tool -- and a very often used, one way or another.
(snip - already addressed in some other post)
If one is going to hammer on "coupling", then
you cannot pick and choose which coupling you keap and which you reject
without justification.
Not "without justification".
If *all* coupling is bad,
Where did you get the baroque idea that "all" coupling would be bad ? What we want is to avoid coupling between parts that have (or may have) to change independantly (and I agree that deciding what should be decoupled from what is not always easy). Now the problem addressed by polymorphism is how to decouple usage from implementation (not to decouple from usage from usage, which would be totally meaningless) . In other terms, it's a matter of "what, not how" - something that DBMS try to solve in the domain of data management BTW.
.
- Follow-Ups:
- Re: Poly Couples
- From: topmind
- Re: Poly Couples
- References:
- How to motivate use of OO?
- From: nassegris
- Poly Couples (was: How to motivate use of OO?)
- From: topmind
- How to motivate use of OO?
- Prev by Date: Re: Poly Couples (was: How to motivate use of OO?)
- Next by Date: Re: How to motivate use of OO?
- Previous by thread: Re: Poly Couples
- Next by thread: Re: Poly Couples
- Index(es):
Relevant Pages
|