DEV Community

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

Collapse
 
binarydelight profile image
Binary Delight • Edited

Well said, these comments also make me sad. It means so many programmers still don’t get it.

Reducing Cyclomatic Complexity is vital to reduce bugs. Avoiding the use of a hash and rather using ifs is not clever. It’s short sighted.

Collapse
 
tomazfernandes profile image
Tomaz Lemos

Hi Roger, thanks for your feedback! I've written a blog post about another pattern, if you'd like to take a look I'd really appreciate your feedback on that as well.

Thanks again and happy new year!