3 ms·
"We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programme
by thristian 16y ago
"We believe that coupling exceptions to a control structure, as in the try-catch-finally idiom, results in convoluted code. It also tends to encourage programmers to label too many ordinary errors, such as failing to open a file, as exceptional."
To me, that comes across as "We don't like traditional exception handling because languages that use exceptions for error-handling encourage programmers to use exceptions for error-handling." Well, yes, that's what they're for.
Python's exception system is far from perfect - it would be nice if there were a standard way to annotate exceptions, and if exceptions weren't quite so inefficient - but it's much easier to design or learn an API when there's one error-handling system consistently applied, instead of two independent ones.