i think he just accidentially reversed the examples and meant to say: if X == Y then zero_type(X) == zero_type(Y),
Never the less, this is also not guaranteed since as mentioned before, zero_type checks for an attribute of 'zero' that `== doesn't look at. I.e:
0 == UNDEFINED;
(1) Result: 1
zero_type(0);
(2) Result: 0
zero_type(UNDEFINED);
(3) Result: 1
UNDEFINED is zero but 0 isn't UNDEFINED, unless of course... it is. :-)
/ David Hedbor
Previous text:
2003-01-22 03:09: Subject: Re: zero_type() & UNDEFINED (bug?)
On Wed, Jan 22, 2003 at 03:00:00AM +0100, Johan Sundström (a hugging punishment!) @ Pike (-) developers forum wrote:
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;
i think he just accidentially reversed the examples and meant to say: if X == Y then zero_type(X) == zero_type(Y),
greetings, martin.
/ Brevbäraren