← Back to context

Comment by tialaramex

3 hours ago

I think Hoare is bang on because we know the only similar values in many languages are also problematic even though they're not related to memory.

The NaNs are, as their name indicates, not numbers. So the fact this 32-bit floating point value parameter might be NaN, which isn't even a number, is as unhelpful as finding that the Goose you were passed as a parameter is null (ie not actually a Goose at all)

There's a good chance you've run into at least one bug where oops, that's NaN and now the NaN has spread and everything is ruined.

The IEEE NaNs are baked into the hardware everybody uses, so we'll find it harder to break away from this situation than for the Billion Dollar Mistake, but it's clearly not a coincidence that this type problem occurs for other types, so I'd say Hoare was right on the money and that we're finally moving in the correct direction.