Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

First you accept that null and an empty string are the same thing. Then you insert a null.


But they are not. Empty string means "we know this is empty", Null means "We don't know".

For example, I have a second name. Some people don't have second names. And some records we might not even know if such exists. Null means "unknown". Empty string cannot be equal to null.


Somebody hasn't learned how to love big brother yet.


It's like how at one time, "0" was not yet invented and had to be invented and explained, and it was a revolution for math. It's a quantity just like 5 or 244, but for when the amount happens to be none.

We need that again, another new 0 concept to add to 0, to distinguish between "set-to-0" and "not-yet-set".

Maybe 2 new concepts, since null is also different from 0. 0 is a value, null is the absense of a value.

Not just as an idiom or implementation detail in a programming language, but as a general concept that may be used anywhere in life.

Without it, we have exactly these confusions and ambiguities and differences of opinion about how to do something or what something means or what something should mean.


Bad software punishes you for doing things right.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: