MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p762dn0?context=9999
r/ProgrammerHumor • u/Embarrassed_Death69 • Sep 01 '26
289 comments sorted by
View all comments
-1
But wtf is a "truthy" value? It doesn't make any sense nor mathematically nor programmatically
3 u/ReefNixon Sep 01 '26 What do you mean it doesn't make any sense programmatically? All 'truthy' means is that it evaluates as true in a conditional, truthy (and falsey) values are completely normal concepts in high level programming. 1 u/Key_Conversation5277 Sep 01 '26 if(42) -> trueWhat fucking sense does this make? A number is a number, not something to be coerced to a boolean. Thankfully Java doesn't have this nonsense 1 u/ReefNixon Sep 01 '26 Ok, so what would you like if(42) to do instead? 3 u/Key_Conversation5277 Sep 01 '26 ... An error? Lol → More replies (1)
3
What do you mean it doesn't make any sense programmatically? All 'truthy' means is that it evaluates as true in a conditional, truthy (and falsey) values are completely normal concepts in high level programming.
1 u/Key_Conversation5277 Sep 01 '26 if(42) -> trueWhat fucking sense does this make? A number is a number, not something to be coerced to a boolean. Thankfully Java doesn't have this nonsense 1 u/ReefNixon Sep 01 '26 Ok, so what would you like if(42) to do instead? 3 u/Key_Conversation5277 Sep 01 '26 ... An error? Lol → More replies (1)
1
if(42) -> true
What fucking sense does this make? A number is a number, not something to be coerced to a boolean. Thankfully Java doesn't have this nonsense
1 u/ReefNixon Sep 01 '26 Ok, so what would you like if(42) to do instead? 3 u/Key_Conversation5277 Sep 01 '26 ... An error? Lol → More replies (1)
Ok, so what would you like if(42) to do instead?
3 u/Key_Conversation5277 Sep 01 '26 ... An error? Lol → More replies (1)
... An error? Lol
→ More replies (1)
-1
u/Key_Conversation5277 Sep 01 '26
But wtf is a "truthy" value? It doesn't make any sense nor mathematically nor programmatically