DEV Community

Discussion on: I've never become overly convinced that switch statements are that much cleaner than `if else if else if else if else`

Collapse
 
wincentbalin profile image
Wincent Balin

AFAIK the compilers for embedded systems translate the switch-statements to jump tables, hence we might perceive this construct as an abstraction for a certain low-level structure(s).

Of course, looking from the developer's perspective only it is just an oversized if..else if..else-statement with indentation problems.