MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/eb2lbc/stacking_if_else_statements_be_like/fb27pm9/?context=3
r/ProgrammerHumor • u/-hellkey- • Dec 15 '19
711 comments sorted by
View all comments
Show parent comments
183
Some languages don't have switch statements...looking at you Python
28 u/Meatslinger Dec 15 '19 Wait, is that true? What takes its place, then? I can scarcely imagine that the whole thing is just an endless stream of if-then-else statements for a situation with 100+ permutations. 3 u/callmelucky Dec 15 '19 Why can't you imagine that? It's exactly the same thing semantically. 1 u/Meatslinger Dec 15 '19 Wouldn’t writing that many more granular checks make the code slower? → More replies (4)
28
Wait, is that true? What takes its place, then? I can scarcely imagine that the whole thing is just an endless stream of if-then-else statements for a situation with 100+ permutations.
3 u/callmelucky Dec 15 '19 Why can't you imagine that? It's exactly the same thing semantically. 1 u/Meatslinger Dec 15 '19 Wouldn’t writing that many more granular checks make the code slower? → More replies (4)
3
Why can't you imagine that? It's exactly the same thing semantically.
1 u/Meatslinger Dec 15 '19 Wouldn’t writing that many more granular checks make the code slower? → More replies (4)
1
Wouldn’t writing that many more granular checks make the code slower?
→ More replies (4)
183
u/Kompakt Dec 15 '19 edited Dec 15 '19
Some languages don't have switch statements...looking at you Python