2 ms·
This: > We believe that coupling exceptions to a control > structure, as in the try-catch-finally idiom, > results in convoluted code. Seems at odds wit
by pyre 15y ago
This:
> We believe that coupling exceptions to a control
> structure, as in the try-catch-finally idiom,
> results in convoluted code.
Seems at odds with this:
f, err := os.Open("filename")
if err != nil {
// handle error
}
You're still using a control structure (if-statement) to handle the error.
- kinghajj 15y agoBut that control structure isn't specific to handling errors, unlike try/catch. I think that's what they meant.