2 ms·
> you may have no idea what type is being sent your way, where from or what to meaningfully do about it as a result. How is this different from (a) errors bubb
by jacques_chester 7y ago
> you may have no idea what type is being sent your way, where from or what to meaningfully do about it as a result.
How is this different from (a) errors bubbling up with a pile of concatenated strings as the only type information or (b) errors not bubbling up because someone decided they would never make a mistake?
The whole value of exceptions, to me, is consistency. The error is guaranteed to propagate in a consistent way up the stack. Static type analysis has a fighting chance of predicting what could ever propagate up the stack, whether checked or unchecked.
Trying to work out out what `err` might be in various situations is an exercise in forensic grepping. Trying to react intelligently and reliably to different types of error is an exercise in hoping nobody changes the error string.
- codr7 7y agoThere's no need to unwind the stack to get what you want. Restarts [0] evaluate the error handler in the throwing scope/environment and the only way out of there is invoking a predefined restart or aborting the program. [0] https://github.com/codr7/g-fu/blob/master/v1/doc/typical_restarts.md https://github.com/codr7/g-fu/blob/master/v1/doc/typical_res...
- jacques_chester 7y agoI'm aware of, but have never used, the CL conditions/restarts mechanism. It seems amazing but I wonder if it would manage to seem foreign to everyone in one of these discussions.