//
sign in
Post
by @danabra.mov
PostEmbed
by @danabra.mov
Record
by @jimpick.com
Record
by @atsui.org
+ new component
Post
Good read on #Go nil check. But in defense of people doing overzealous checks - in large programs, sometimes tracking preceding nil checks are super hard. I am still a bit bummed Go didn't go for Rust like option types to do away with nils altogether.
2d
Most nil checks I see in Go aren't defensive programming. They're a sign that the code lost track of what can and cannot be nil. A nil check is good when it enforces a real boundary. It's suspicious when it silently handles a state your program claims is impossible konradreiche.com/blog/excessi...
2d
Let’s talk about nil pointer checks in Go. You want to prevent panics in production, but that doesn’t start with a deferred recover. It starts with defensive programming. Check your inputs, check your...
konradreiche.com
Excessive nil pointer checks in Go
Konrad Reiche
Redowan Delowar