DEV Community

Discussion on: Keeping your code clean by sweeping out "if" statements

Collapse
 
josephthecoder profile image
Joseph Stevens

The original switch statement was logically complete, the map example introduces the possibility of application exceptions. So it may be more readable, but it's more likely there is a bug, that isn't a win in my book