Switches are really only for enumerated/integral types, where a single variable can take on a small number of interesting values. Some if-else situations don't translate to switch-case at all, though. One such is when you're faced with decision tree logic, involving multiple variables. Another occurs when you need to (or are stuck with) matching various strings.