251 reputation
13
bio website
location
age
visits member for 2 years, 1 month
seen Dec 9 '13 at 21:57

Jan
26
comment Martin Fowler's Refactoring book: switch statement is using other object's data, why is that bad ? A deeper explanation is sought for.
It actually wants you to avoid switch statements based on data types. Each of those types should be an object, and the task should be performed by the each class instead. The class for new releases should give the charge for new release, etc. Keep the knowledge specific about a class in the class. By doing so, you can easily add new classes without having to alter logic in the class's users.
Aug
31
awarded  Yearling
Feb
28
awarded  Caucus
Sep
3
awarded  Nice Answer
Aug
31
awarded  Teacher
Aug
31
answered Name for this antipattern? Fields as local variables