re: I've never become overly convinced that switch statements are that much cleaner than `if else if else if else if else` VIEW POST

FULL DISCUSSION
 

The main danger is the need to place a break; inline to prevent execution flowing through to the next block. Never found this very consistent with other conditional structures. Basically just an opportunity for a bug. It is also often abused, in that we don't want large conditional blocks of code. Usually there are better ways.

code of conduct - report abuse