Re: Standard library praise and challenge
- Posted by useless Sep 17, 2011
- 2988 views
As if it mattered, i believe NULL = NULL. If i have nothing in both paws, then i have the same amount of the same nothing in both paws, ergo the contents of both paws are equal. I understand NULL != zero, but i didn't define what i have nothing of in my paws, if i have "no worms" then i have zero worms, and that's not NULL.
But NaN is not the same, as if x = "blah", y = burb", x is NaN , y is a NaN, but they are different NaNs. If you are not in the right include file to deal with x and y, best you can return is their commonality, in math.e (or whatever) math.compare(x,y) = NaN. But it's not NULL, they are something, but in math.e the comparison may be illogical (or maybe it isn't). Doing this in string.e would give a different answer.
If i asked for the pointer to a function, and you gave me NULL, i believe the function does not exist. But if you give me NaN, then i believe you made an error.
useless, naturally