Remix.run Logo
inlined 5 days ago

You actually should never return a specific error pointer because you can eventually break nil checks. I caused a production outage because interfaces are tuples of type and pointer and the literal nil turns to [nil, nil] when getting passed to a comparator whereas your struct return value will be [nil, *Type]

stouset 4 days ago | parent [-]

It's really hard to reconcile behavior like this with people's seemingly unshakeable love for golang's error handling.

TheDong 4 days ago | parent [-]

People who rave about Go's error handling, in my experience, are people who haven't used rust or haskell, and instead have experience with javascript, python, and/or C.

https://paulgraham.com/avg.html