3 ms·
Having both switch and if/elif allows writing code with less redundancy in it (unnecessary keywords and variables can be elided by choosing one selection constr
by nsajko 6y ago
Having both switch and if/elif allows writing code with less redundancy in it (unnecessary keywords and variables can be elided by choosing one selection construct over the other).
- lucideer 6y agoWhen you say "less redundancy", do you just mean terser code? Or what exactly? I don't see any DRY trade-offs, unless you're talking on a really micro character-count / code-golf level.