It is logical to expect that if zero_type(X) == zero_type(Y) then X == Y.
I am curious as to where you got that idea. That implication never holds; a trivial counter example is zero_type(4) == zero_type(5), whereas 4 != 5. zero_type() tests a a property that `== does not see.
/ Johan Sundström (a hugging punishment!)
Previous text:
2003-01-22 02:35: Subject: zero_type() & UNDEFINED (bug?)
Hi all,
It is logical to expect that if
zero_type(X) == zero_type(Y)
then X == Y However:
0 == UNDEFINED
but
zero_type(0) != zero_type(UNDEFINED)
this means that checks like some_value == UNDEFINED will never work correctly if some_value is an integer zero.
Using zero_type() is not always convenient, at least not for readability...
I suspect that this wasn't intended to operate this way, or?
Regards, /Al
/ Brevbäraren