giovedì 15 novembre 2012

Strategy pattern

Six Design Patterns to Start With | Jeremy D. Miller:
"Repeated switch statements can easily lead to duplicated code, and longish switch statements, in my experience, can lead to code that is hard to read and buggy.  Seeing a repeated switch statement on a type code is a sign that there is an abstraction in your code that’s trying to come out."