4 ms·
Not all conditions signify exceptional situations. The author conflated error with condition but you're doing the opposite of conflating condition with exceptio
by metroholografix 7y ago
Not all conditions signify exceptional situations. The author conflated error with condition but you're doing the opposite of conflating condition with exception.
The big plus of the Common Lisp condition system is that it gives you a programmable substrate that you can use to implement a wide variety of signaling and control flow systems. It does give you error and exception handling -on top of the condition system- but that shouldn't shoehorn your thinking into just these problem domains.
- Jtsummers 7y agoAs an example of non-exceptional condition signaling: http://jacek.zlydach.pl/blog/2019-07-24-algebraic-effects-you-can-touch-this.html http://jacek.zlydach.pl/blog/2019-07-24-algebraic-effects-yo... Progress can be signaled, and then dealt with if needed. In headless mode it won't be handled. In a console it could be a progress bar or statement. In a GUI, update a variable that changes the status display. And it ends up as little more than a no-op if there are no handlers for it. Nothing exceptional about it, but creates a great deal of flexibility in managing a system.
- deleted 7y ago[deleted]
- kazinator 7y agoThere is also nothing conditional about reporting progress, except in the sense that the progress is an indication of state. According to a Honeywell PL/I reference manual, "a condition is a state of the executing program". The progress of some activity being 50% through is a state of the executing program. (All the built-in PL/I conditions are exceptional situations though. This is really the same use of the word "condition" that we find in "condition status register", a machine word that tells us via flags that exceptional situations have happened like numeric overflow.)
- kazinator 7y agoNot all exceptions signify exceptional situations, either.