• cockmushroom@reddthat.com
    link
    fedilink
    arrow-up
    1
    ·
    10 days ago

    As someone who’s never written go professionally and never contributed code that needed a nil check to open source, I have a rule whereby I never return nil pointers (other than slices) unless i’m returning a non-nil error and vis versa. Is that enough? I did read through the article but I didn’t feel like it reached a clearer conclusion than “you can avoid checking by having standards” and I assume that what I’ve been doing is missing something.