Re:My Opinion on “5” == 5
by nybble41 on Thursday July 29, 2021 @05:10PM
(#28001550)
If you could do relative comparisons like "5" < 5 and get a boolean answer, that would be surprising. I don't see anything controversial, however, about unequivocally reporting that objects of different types are unequal. In Lua anything can be tested for (in)equality but asking whether a string is greater than or less than a number is an error, as is performing an ordered comparison involving any other type(s).
[ Parent
| on HN ]
There are no comments on this comment yet.