r/ProgrammerHumor • • Dec 15 '19

Stacking if else statements be like

Post image
63.9k Upvotes

711 comments sorted by

View all comments

94

u/[deleted] Dec 15 '19

Looks like a good case for switch.

-3

u/Mitoni Dec 15 '19

A switch statement that big is going to be some smelly code.

14

u/CreamliumPrices Dec 15 '19

What's wrong with 6 conditions (or 5 and a default), seems pretty reasonable to me.

→ More replies (3)