I've read that you should only typically use switch statements if your logic is simplistic and if, elseif, else when dealing with more complex logic. Would you agree or disagree?
Switch vs if, elseif, else
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Oct 23, 2014, 4:39 AM EDT
You can only switch on integers, characters, strings or enums and, if you need to specify a range of values, then you have to stack cases on top of each other which is clearly only viable where the range is very small.
So, yes, I'd agree that the situations where switch can be used are quite limited and most of the time you have to use an if/else if/else ladder instead.
In fact, I know some programmers who avoid switch altogether because they feel that having to put 'break' or a similar jump statement at the end of each case makes it unnecessarily verbose.