Hacker News new | past | comments | ask | show | jobs | submit login

> I think that databases need to have the concept of NaN for dates and time stamps, except that this should be configurable to something like a poop emoji or something like ⁉

How about just NULL?




Making database columns nullable isn’t a free ride.

In some situations, you are trading one known point of failure for a million unknown ones. Among other problems :)


So have another column adjacent to the date that stores an enum with an error code with a reason for why the date is missing. My point is, this is business logic, doesn't have a universally applicable definition, and should be handled on a case-by-case basis rather than trying to hard-code it into the date type in the DB.

Default date types, with some columns being nullable, work just fine for my project. I wouldn't want them to be more complicated and force me to consider additional cases, especially if those cases aren't language compatible.


> How about just NULL?

Off topic, but this reminded me of:

Hello, I'm Mr. Null. My Name Makes Me Invisible to Computers

https://www.wired.com/2015/11/null/amp


"The server returned an unexpected error."

Now GLHF!




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: