AlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor@lemmy.ml · edit-22 years agoand people wonder why we say PHP is a memelemmy.worldimagemessage-square41fedilinkarrow-up1205arrow-down120
arrow-up1185arrow-down1imageand people wonder why we say PHP is a memelemmy.worldAlmightySnoo 🐢🇮🇱🇺🇦@lemmy.world to Programmer Humor@lemmy.ml · edit-22 years agomessage-square41fedilink
minus-squarelowleveldata@programming.devlinkfedilinkarrow-up2arrow-down2·2 years agoIt is sort of readable. A switch is “perfectly” readable for switching.
minus-squareSerdan@lemm.eelinkfedilinkarrow-up0arrow-down1·2 years agoTernary expressions aren’t switches though
minus-squareKryomaani@sopuli.xyzlinkfedilinkEnglisharrow-up1·2 years agoWhich is exactly why you shouldn’t be using them in a situation that clearly calls for a switch.
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.