Maybe you didn’t understand what I meant by excessive datatype check; it means, checking datatype when it’s not necessary and doing so will result in a fail when the coerced values are the same but the datatypes are different. I’ve had to fix code where people put in unnecessary triple-equals (the data would not have been a result that would have made a datatype check useful) and data was not parsed correctly.
Example: You get an XML file value that is string 0 (“0” or ‘0’) where the left side checks a var that is numeric 0… the parse will return false when the equivalency was true, therefore a false negative.
I’ve also seen instances where coders have
Again, the author’s example is facetious because the meme is using the left side comparator improperly; initializing it with the wrong datatype for the comparison. The left side needs to be the expected datatype, no matter what, not the other way around. Maybe that’s what you’ve misunderstood.