Quote Originally Posted by Schmidt View Post
You mean "specific Duck-Class" (which my implementation doesn't need at all, to cover the scenario).
No, I mean the implementation of the duck interface or abstract class. Whether you need it or not, if you have a property of "can fly," "nurses young," "extinct," etc., that will each have an if statement you will need to modify if you implement a new class or a duck goes extinct. Instead of just updating the interface, you now need to hunt down everywhere you have these if statements and update them. Hardly maintainable.

Quote Originally Posted by Schmidt View Post
Wich would be "hard-coding" as well... (in a specific class, which the example avoids)...
Not hard-coding, especially if you are loading up the ducks as extensions. The core of the interface isn't changing, the properties of the implementation are.

Quote Originally Posted by Schmidt View Post
Not at all - in your case, you will have to locate the position to "change something"
(e.g. to be able to make a formerly non-flying "RubberDuck fly") this way:
- locate the "type of duck" in your Code (double-click on cRubberDuck for example)
- locate the correct "duck-behaviour"-Method of this Class (in this case Fly - or the Constructor)
Apply your changes in the appropriate Method.

In my case the thing works over the same steps (just starting with the behaviour you want to change):
- locate the "duck-behaviour" you plan to change (double-clicking on the bDuckFly-Class)
- locate the "type of duck" you will apply these changes to (over the Enum-Value)
Apply the changes in the appropriate Select Case.
Maybe it is my way of thinking, but when I want to modify the a property of "rubber duck" I go into the rubber duck and find the property. I wouldn't think "I want to modify the rubber duck, so let me find the class that houses the property."

Quote Originally Posted by Schmidt View Post
A behaviour-Class is *not* Core-Code - one can easily inject another one also in the Factory, if you care to do so
(e.g. to implement a special "Flight-Mode" for RubberDucks in a separat, dedicated behaviour-class)
I completely disagree. If I have a system that is used to categorize ducks, and for some reason I'm not using some kind of database, but rather extensions that house the information, it is definitely a core change to update that information. Instead of simply dropping a DLL into the project folder or something, I now need to edit the source code to update.

Quote Originally Posted by Schmidt View Post
Nope, absolutely not (and BTW, it was Funky, not Shaggy who provided the "Duck-Strategies").
Whoops, sorry for the mistake Shaggy/Funky! I'll update my post after this. As for your comment, I've added comments to every point I've made as to why I feel the way I do. Can you elaborate more than "absolutely not"? My quotes above show even more why his is more maintainable in a real-world scenario. Yours may be nicer in a "this will never change so my code is more readable" scenario, but we all know that is never the case.

Quote Originally Posted by Schmidt View Post
Please enhance Funkys example about "Displaying on a Printer" -
then post the needed Diffs... I will then do the same on my example.

Olaf
Not sure if that is directed towards me or not. I have no idea to what you're referring.