Demonstration code for several things at the same time

Why is the usage of break an argument against switch()? That is the same as saying the use of else is an argument against if... It are code constructs to make an algorithm easier to maintain and give the compiler means to optimize the code.

For a switch statement there are at least 2 ways to compile to machine code while an if then else ladder (expressed functionally equivalent) cannot. One reason is that for a switch statement the compiler knows immediately that there is one element in an "is equal" compare, which is every time the same (e.g. optimize in a register). For an if then else ladder every comparison is a new one for the parse tree, which might be optimized later. In switch statements every case must be disjunct, semantics forces that. In an if then else ladder you can do the same comparison multiple times.

A switch statements allows a fall through which can be used for simple OR or for reducing double code. An if then else ladder has no (straightforward) equivalent for that.

For me the only drawback of the switch statement is that it does only support simple integer types and not complex or aggregate like strings and structs. BUt that is by design so I can (have to) live with that.