News for hackers. Stuff that matters.
Re:Evil Coding Incantations by boffinism on Monday December 25, 2017 @04:05PM (#16005701)
Hmm. If you have a measurement of zero, you still have a measurement, which is more different to having no measurement at all than it is to having a measurement of 1. Especially if you are measuring centigrade!
Re:Evil Coding Incantations by mjevans on Tuesday December 26, 2017 @12:41AM (#16007314)
Is there a measure at all? This is a different question than the value of the measurement. (Though "I don't know" doesn't map very well to rational numbers... maybe a float NaN could be abused).

That's why many databases allow for (the option of) types to include a NULL value that is handled specially.

When you are rolling your own data design it is a legitimate question to ask: "Will an incomplete version of this object exist?" If the answer is yes, then the design should accommodate making that distinction.