this post was submitted on 17 Jul 2025
233 points (87.0% liked)

Programmer Humor

32283 readers
1882 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 

(Shamelessly stolen from reddit)

you are viewing a single comment's thread
view the rest of the comments
[โ€“] WiredBrain@lemmy.ca 19 points 1 year ago (4 children)

I'm not CS smart enough to understand this... ๐Ÿ˜ข

[โ€“] edinbruh@feddit.it 42 points 1 year ago

"Ternary operator" means "operator that takes three things", like unary and binary operators take one and two things.

In C there is an operator for conditional expressions (an 'if' that you can put inside expressions) and it looks like this condition ? trueBranch : falseBranch. It takes three expressions, so it's a ternary operator.

Except it's the only ternary operator in C (and most languages, if they have one at all), so instead of calling it something like "conditional operator", they just call it "the ternary operator"

[โ€“] pocker_machine@lemmy.world -3 points 1 year ago (1 children)

Honestly, it is not worth it and only mildly funny. You didnโ€™t miss anything.

[โ€“] lena 3 points 1 year ago

Very useful reply ๐Ÿ‘

[โ€“] mobotsar@sh.itjust.works -3 points 1 year ago (1 children)

The joke is that the people in the conversation are kinda dumb

[โ€“] lena 1 points 1 year ago (1 children)
[โ€“] mobotsar@sh.itjust.works -1 points 1 year ago (2 children)

Well if you make me actually explain it, I'm going to sound like an asshole; the joke is so obvious and low-level and the type of humor so uninspired that I figure they must be a little.. you know, dumb.

[โ€“] andronicus@lemmy.world 2 points 11 months ago (1 children)

Well if you make me actually explain it, I'm going to sound like an asshole

Too late muchacho... you're already giving real big superiority vibes here

[โ€“] mobotsar@sh.itjust.works 1 points 11 months ago

Yeah.. well, you know.

[โ€“] lena 2 points 1 year ago

It's not the best joke I've seen, but I wouldn't call it dumb. To each their own, I guess. Jokes are subjective.