r/ProgrammerHumor 23h ago

Meme iHateThisPassiveAgressiveBehaviourRuby

Post image
2.6k Upvotes

276 comments sorted by

View all comments

0

u/Key_Conversation5277 22h ago

But wtf is a "truthy" value? It doesn't make any sense nor mathematically nor programmatically

2

u/deceze 22h ago

Any value that causes an if statement to run its associated block, instead of going to else/doing nothing.

2

u/Nimeroni 22h ago

His argument is that you should make your if statement explicit.

1

u/deceze 22h ago

Ah, my bad.

if (thing is truthy) {
    print('Yeah, much better');
}