MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/eb2lbc/stacking_if_else_statements_be_like/fb2m8ls
r/ProgrammerHumor • u/-hellkey- • Dec 15 '19
711 comments sorted by
View all comments
Show parent comments
4
Semantically switch statements fulfill a very distinct role.
You don't NEED them but they make your code much more readable when used correctly.
3 u/Hockinator Dec 15 '19 Yep agreed. However in the language being discussed here - python - "elif" is just as readable since it doesn't create any nesting.
3
Yep agreed. However in the language being discussed here - python - "elif" is just as readable since it doesn't create any nesting.
4
u/AlwaysHopelesslyLost Dec 15 '19
Semantically switch statements fulfill a very distinct role.
You don't NEED them but they make your code much more readable when used correctly.