Hi Martin
First apologies for the delay in replying - I have been away for a few days without on-line access so I have only been able to check E-Mail intermittently.
>"It's even possible for an object to change its implementation at run-time."
This relates to the ability to instantiate different classes at run time (which IS the "Intent" of the pattern). The object employing the strategy has its implementation modified BECAUSE it instantiates different classes.
Regards
Andy Kramek
>Thanks Andy,
>
>I think the basis for our discussion was this line in the consequences section:
>"It's even possible for an object to change its implementation at run-time."
>
>You say this should not be done. When you do use a stategy, right?
>
>Martin van Krieken
>
>
>>Actually you will find that most design patterns either use, or are based on, the bridge. It is probably the most fundamental pattern. However, what really matters in the context of a pattern is the "Intent".
>>
>>You are correct in noting that the result of implementing a strategy pattern is actually a bridge. However, a Strategy is not static; the idea is that different objects can be used at one side of the bridge depending on circumstances. So the intent of the two patterns is quite different.
----
Regards
Andy Kramek