Hacker News new | ask | show | jobs
by cratermoon 1880 days ago
I've been in software development for 27 years, and I've never seen a case where a boolean column or variable being null was anything but a terrible, confusing, fragile, hack.

Remember that in some languages the behavior of null is weird, and can be false, or can be treated as 0.

    $ node
    Welcome to Node.js v14.16.0.
    Type ".help" for more information.
    > null + null
    0
    >
    > 0 == false
    true
    > 0 === false
    false
    >
1 comments

What has the ridiculousness of Javascript got to do with a database schema?
What good is a database schema if it doesn't have data and isn't used by any applications?
There are languages with nice optional types, which maps nicely to SQL null. Not Javascript though and I wouldn't want to use it server side.