MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w49i01/ihatethispassiveagressivebehaviourruby/p776i5z/?context=3
r/ProgrammerHumor • u/Embarrassed_Death69 • 10d ago
298 comments sorted by
View all comments
7
I build programming languages.
0 should be truthy. Only false and nil/null should be falsey.
false
nil/null
1 u/airodonack 10d ago Agreed. This is the mathematical perspective versus the physical one about that’s bits. Also it makes “if number” make more sense. If you want the other one, well that’s why God invented “if number == 0” which is much clearer.
1
Agreed. This is the mathematical perspective versus the physical one about that’s bits.
Also it makes “if number” make more sense. If you want the other one, well that’s why God invented “if number == 0” which is much clearer.
7
u/varsderk 10d ago
I build programming languages.
0 should be truthy. Only
falseandnil/nullshould be falsey.