this post was submitted on 14 Jul 2023
4 points (70.0% liked)
Programmer Humor
32426 readers
668 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To be fair: If you are chaining ternary expressions, you deserve to suffer whatever pain the language happens to inflict upon you tenfold.
Why?
It's perfectly readable.
It is sort of readable. A switch is "perfectly" readable for switching.
Ternary expressions aren't switches though
Which is exactly why you shouldn't be using them in a situation that clearly calls for a switch.