3 ms·
If == is supposed to be a numeric comparison and you are supposed to use strcmp for strings then why does == (sometimes) work on strings? Make it always coerce
by extension 14y ago
If == is supposed to be a numeric comparison and you are supposed to use strcmp for strings then why does == (sometimes) work on strings? Make it always coerce to a number, or die trying. Overloading it as numeric or string compare depending on what the string looks like is ridiculous.
And BTW, things that work in most cases, but not all cases, are exactly where bugs come from.
- MartinCron 14y agothings that work in most cases, but not all cases, are exactly where bugs come from If I didn't have such a low pain tolerance, I would get that tattooed on my body somewhere prominent.