MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wpw10f/ihatedituntilitriedit/pc14vad/?context=3
r/ProgrammerHumor • u/Epicoodle • Sep 25 '26
540 comments sorted by
View all comments
Show parent comment
1
Perl does this too, and I think all the others evaluate true. It doesn't coerce it into a number and decide 0 is false, just has the one exception.
1 u/mmhawk576 Sep 25 '26 I think it annoys me even more that itβs not just trying to coerce to a number and then compare to zero. Like no, they went out of their way to decide β0β as false is a feature they want.
I think it annoys me even more that itβs not just trying to coerce to a number and then compare to zero. Like no, they went out of their way to decide β0β as false is a feature they want.
View all comments
Show parent comment
1
u/MattieShoes Sep 25 '26
Perl does this too, and I think all the others evaluate true. It doesn't coerce it into a number and decide 0 is false, just has the one exception.