and people wonder why we say PHP is a meme

3 years ago by AlmightySnoo 🐢🇮🇱🇺🇦 to c/programmerhumor

load all comments
kibiz0r 175 points 3 years ago

To be fair: If you are chaining ternary expressions, you deserve to suffer whatever pain the language happens to inflict upon you tenfold.

path: 0 1241156, hotness: undefined, score: 175, children: 15
Serdan -11 points 3 years ago

Why?

It's perfectly readable.

path: 0 1241156 1246427, hotness: undefined, score: -11, children: 14
lowleveldata 38 points 3 years ago

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

path: 0 1241156 1246427 1248624, hotness: undefined, score: 38, children: 7
deaf_fish 0 points 3 years ago

There is usually a safer and more readable way to do what you want to do by chaining ternaries in most languages.

path: 0 1241156 1246427 1261901, hotness: undefined, score: 0, children: 5
programmerhumor
programmerhumor

@lemmy.ml

login for more options
43743
1627
1185

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.

go to feed...