3 ms·
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,
by cratermoon 6y 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
>
- secondcoming 6y agoWhat has the ridiculousness of Javascript got to do with a database schema?
- cratermoon 6y agoWhat good is a database schema if it doesn't have data and isn't used by any applications?
- cutemonster 6y agoThere 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.