Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thank you, I'll stick to languages where you can't just compare numbers and strings without an explicit conversion.

Also, should 48 == "48.0" be true? How about "048", "48.", "0x30", " 48 ", "48foo", "3*16", "XLVIII", "forty-eight"?



Once again: just use ===

If you decide languages based on minutiae like this, I can only pity you.


=== works for equality (if you actually remember to use it), but how about comparison? There's no strict version of <.


strcmp




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: