0, null, unknown, invalid, (ad infinitum)
0, null, unknown, invalid, (ad infinitum)
Posted Jan 10, 2024 15:05 UTC (Wed) by Wol (subscriber, #4433)In reply to: 0, null, unknown, invalid, (ad infinitum) by NYKevin
Parent article: The return of None-aware operators for Python
But again, is_alive is tri-state, yes, no or unknown. So we can't declare an "obviously boolean" property as boolean.
This is the big problem, we want to know the difference between "there is no answer" and "the answer is unknown". It's all very well saying "add an extra column and comment it", but at the end of the day, if I can't find out how old someone is just by querying the "age" column, then there is a problem (and yes it's a hard problem) with the database.
I'm not claiming to have a solution. It's just blindingly obvious that the solutions we have are over-complex - we need to do better AND recognise that there is a problem with the current setup. We need some sort of quartean logic :-) Maybe this is where FORTRAN's "arithmetic if" should make a comeback :-)
Cheers,
Wol
Posted Jan 10, 2024 18:52 UTC (Wed)
by mpr22 (subscriber, #60784)
[Link] (1 responses)
"not(reported_deceased)" is an adequate value to know, and "reported_deceased" really can be stored as a non-nullable boolean or, indeed, extrapolated from whether the nullable timestamp value "demise_reported_date" is not null.
Posted Jan 10, 2024 22:43 UTC (Wed)
by Wol (subscriber, #4433)
[Link]
Like I said, if we don't have a valid birth or death, then we don't know age, and this hasn't changed it. Like I said, "every fix is going to create a new problem", and that's exactly what's happened here.
I wouldn't create a "demise reported date", I'd just add a "type of death report" so you have your "died" date, and you know whether it is died date, death reported date, reported missing, presumed missing, etc etc.
But like I said, if you don't get your problem space definition right, things just go from bad to worse ...
Cheers,
0, null, unknown, invalid, (ad infinitum)
0, null, unknown, invalid, (ad infinitum)
Wol