4 ms·
Switch is not bad, far less is there any reason to hate it.
by radiator 4y ago
Switch is not bad, far less is there any reason to hate it.
- smnplk 4y agoAgree. It's the same as saying don't use for loops or any other basic language constructs. Switch is very useful, please leave switch alone! You will not take switch away from me :)
- jbverschoor 4y agoWhen do you actually pass through? Only some state machines do that. But even I. That case, ifs are more clear and less error prone due to missing breaks, braces/scoping issues, etc