Hacker News new | ask | show | jobs
by fhars 2353 days ago
Numerical zero has nothing to do with the issue discussed here. What you are proposing is to add another “number” to types like int and float that results in the program crashing whenever you try to add it to another number.
4 comments

It does! It's the numerical "null object", just like the empty string and empty collection.
> What you are proposing is to add another “number” to types like int and float that results in the program crashing whenever you try to add it to another number.

There's already division by zero and NaN to trip you up in IEEE754.

Or there's NaN which just results in NaN and doesn't equal itself. No need to crash.
I think it does