2 ms·
Sure. But complex if/else logic, like I said, is often a code smell that indicates that the behavior might be better off abstracted out to a polymorphic entity
by Sharlin 7y ago
Sure. But complex if/else logic, like I said, is often a code smell that indicates that the behavior might be better off abstracted out to a polymorphic entity of whatever sort is idiomatic in your language. There are a lot of "If statement considered harmful" style articles on the web, but I can't seem to find the specific one I had in mind :/