2 ms·
> Allocating is definitely a big deal for a pervasive error handling! Exceptions are not meant for "pervasive error", they are for exceptional execution paths
by soulbadguy 10y ago
> Allocating is definitely a big deal for a pervasive error handling!
Exceptions are not meant for "pervasive error", they are for exceptional execution paths. If an execution path is frequent enough, wether it's an "error" or not, then it should not be an exception.
I think this is the part of the argument that the "no exception camp" usually misses : there are multi type of errors (recoverable vs fatal, frequent vs unfrequent, expected vs unexpected), having exception is not about using exceptions for all of them
- steveklabnik 10y agoTo be fair to the "no exception" camp, they do see that there are multiple kinds of errors: they partition them into recoverable errors and unrecoverable errors.
- poopsicle 10y agoAnd yet the bulk of this thread was in reference to python where exceptions are the pervasive scheme.
- dbaupp 10y agoAs the sibling points out, this is in the context of the suggestion of using Python's approach, where exceptions are not just pervasive, they are so pervasive they're used for non-errors/control flow (e.g. StopIteration).