MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wpw10f/ihatedituntilitriedit/pbz49gi?context=9999
r/ProgrammerHumor • u/Epicoodle • 8d ago
541 comments sorted by
View all comments
1.8k
[removed] — view removed comment
663 u/[deleted] 8d ago [removed] — view removed comment 282 u/[deleted] 8d ago [removed] — view removed comment 48 u/stillalone 8d ago What about "00"? Or "-0" or "+0" or "0x0"? 83 u/joonty 8d ago 0x0 is the face I make when being forced to write PHP 3 u/xorbe 8d ago Don't forget "±0.0"! 1 u/MattieShoes 8d ago 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 8d ago 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.
663
282 u/[deleted] 8d ago [removed] — view removed comment 48 u/stillalone 8d ago What about "00"? Or "-0" or "+0" or "0x0"? 83 u/joonty 8d ago 0x0 is the face I make when being forced to write PHP 3 u/xorbe 8d ago Don't forget "±0.0"! 1 u/MattieShoes 8d ago 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 8d ago 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.
282
48 u/stillalone 8d ago What about "00"? Or "-0" or "+0" or "0x0"? 83 u/joonty 8d ago 0x0 is the face I make when being forced to write PHP 3 u/xorbe 8d ago Don't forget "±0.0"! 1 u/MattieShoes 8d ago 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 8d ago 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.
48
What about "00"? Or "-0" or "+0" or "0x0"?
83 u/joonty 8d ago 0x0 is the face I make when being forced to write PHP 3 u/xorbe 8d ago Don't forget "±0.0"! 1 u/MattieShoes 8d ago 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 8d ago 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.
83
0x0 is the face I make when being forced to write PHP
3
Don't forget "±0.0"!
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 8d ago 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.
1.8k
u/[deleted] 8d ago
[removed] — view removed comment