Hacker News new | past | comments | ask | show | jobs | submit
In only one of those examples do you get a T that's invalid.
True, Go does require you to follow a convention here (dont use T if err is not nil). In practice it works pretty well, though obviously not bullet proof.

I believe some exceptional languages are similar, like Ruby. If you rescue but dont abort, the variable on the left hand side gets a nil when that may otherwise not be possible. Of course, that is handled cleanly as its own error.

I don't see how. Unless it's the Go example where you get (nil, err)?