Re:Show HN: Sqlkit – Golang SQL package with nested transact...
by pushpop on Saturday July 13, 2019 @03:21PM
(#20429685)
I’ve had a great deal of experience with Go and there are many who’d argue that nil pointers in there is a mistake as well (though I’ve personally never had an issue - but I do write pretty robust tests too).
I have ran into some instances when I have needed nullable fields in relational databases as well. I’m not claiming null shouldn’t exist. My point was that they should be an opt in rather than opt out because they cause more problems than generally they solve.
You may not have this use case you in your application, but I do. I have real scenarios that need to know if a value is initialized or not. I agree that I could solve this in other ways, but nullable columns just aren’t an archaic database option just because you can implement the same behavior in the application code or by rewriting the SQL query.