Goke Pelemo

58%
Flag icon
Polymorphism is one of the key features of object-oriented programming—and, like any useful feature, it’s prone to overuse. I’ve come across people who argue that all examples of conditional logic should be replaced with polymorphism. I don’t agree with that view. Most of my conditional logic uses basic conditional statements—if/else and switch/case. But when I see complex conditional logic that can be improved as discussed above, I find polymorphism a powerful tool.
Refactoring: Improving the Design of Existing Code (Addison-Wesley Signature Series (Fowler))
Rate this book
Clear rating
Open Preview