News for hackers. Stuff that matters.
Re:Excessive nil pointer checks in Go by DanielHB on Monday June 22, 2026 @10:52AM (#48630993)
In a previous job our unhinged devs decided that optionality was defined by golangs default value for primitives (empty string, 0, false, etc) simply because they didn't want to put pointers everywhere.

So the JSON APIs would accept nulls or absent keys when sending data to the API. But when retrieving it we would get golang default values for those keys. And, of course, the backend code was full of == 0, == "", == false...

There are no comments on this comment yet.