| ▲ | nomel an hour ago | |
I would claim the opposite. If you don't catch an exception, you'll get a halt. With return values, you can trivially ignore an exception.
In the wild, I've seen far more ignoring return errors, because of the mechanical burden of having type handling at every function call.This is backed by decades of writing libraries. I've tried to implement libraries without exceptions, and was my admittedly cargo-cult preference long ago, but ignoring errors was so prevalent among the users of all the libraries that I now always include a "raise" type boolean that defaults to True for any exception that returns an error value, to force exceptions, and their handling, as default behavior. > In big projects you can basically never know when or how something can fail. How is this fundamentally different than return value? Looking at a high level function, you can't know how it will fail, you just know it did fail, from the error being bubbled up through the returns. The only difference is the mechanism for bubbling up the error. Maybe some water is required for this flame war. ;) | ||
| ▲ | yoyohello13 12 minutes ago | parent [-] | |
I can agree to disagree :) | ||