Too Long; Didn't Read
The guiding idea behind coding without IF statements is the Open/Closed Principle (the "O" from SOLID) The principle states "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification";[1] that is, such an entity can allow its behaviour to be extended without modifying its source code. To follow the principle, you've got to be able to add new functionality to an entity (or class) without changing the source code. This can lead to wildly complex code that's next to impossible to change.
Share Your Thoughts