this post was submitted on 14 Jul 2023
4 points (70.0% liked)

Programmer Humor

36927 readers
165 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lowleveldata@programming.dev 1 points 2 years ago (1 children)

It is sort of readable. A switch is "perfectly" readable for switching.

[–] Serdan@lemm.ee -1 points 2 years ago (1 children)

Ternary expressions aren't switches though

[–] Kryomaani@sopuli.xyz 1 points 2 years ago

Which is exactly why you shouldn't be using them in a situation that clearly calls for a switch.