Re:Down the Golang Nil Rabbit Hole
by khyryk on Tuesday March 30, 2021 @11:54AM
(#26636135)
I bet there's a ton of Go code out there with methods that assume the pointer receiver cannot be nil without actually checking. The need for the nil checks along with != err everywhere makes for some incredibly verbose code.
[ Parent
| on HN ]
I find that would be a bit pointless. Unless you can actually recover from that, it's better to just panic, since you clearly don't want a nil receiver