4 ms·
The author doesn't seem to understand that not all exceptional situations are errors, which suggests he is a complete newbie to exception handling, which explai
by kazinator 7y ago
The author doesn't seem to understand that not all exceptional situations are errors, which suggests he is a complete newbie to exception handling, which explains why he didn't propose the word "exception" instead of "condition".
- metroholografix 7y agoNot 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.
- reikonomusha 7y agoI’m really awestruck that’s somebody took the time to write an article about Common Lisp, made the approximation of conditions as exceptions, and has many commenters like you and others nitpicking and claiming newbiness. If every time somebody writes something about Lisp and it doesn’t tell 100% of the story, and somebody else chimes in “well ackchewelly you must not be very experienced”, nobody is going to write Lisp. I think the author did a phenomenal job referencing the book they’re reading, and discussing what they learned. Besides, when’s the last time you or anybody else in this thread actually defined and used in a serious manner a non-error condition? It happens, but beyond WARN, it’s so rare and you probably want to use other dynamic constructs anyway. The author could improve simply by saying “Conditions are most often used for error handling” and change little else.
- kazinator 7y agoIf there are lots of comments every time someone writes about Lisp, that's a good health indication.