Re:The Common Lisp Condition System – Upcoming Book
by guenthert on Wednesday July 15, 2020 @01:54PM
(#23848970)
I don't intend to take away the thunder of the announcement of the new book, but I thought Peter Seibel explained it quite well and gave a convincing example in http://www.gigamonkeys.com/book/beyond-exception-handling-co.... It might be worth expanding on that though, as well as presenting some discussion of when and how to use it. And yes, I agree, I think restarts are one of the features I'd like to be available elsewhere too.
[ Parent
| on HN ]
Re:The Common Lisp Condition System – Upcoming Book
by phoe-krk on Wednesday July 15, 2020 @02:06PM
(#23849160)
The PCL description is a good one. My book expands on it two ways.
First, I describe how the condition system can be used to work with conditions that are not errors and therefore do not require to be handled; Peter Seibel calls SIGNAL a "primitive" function, therefore completely skipping the scenario in which a condition may not be handled. And, by that, he skips non-error non-warning conditions altogether!
Second, the PCL chapter does not describe the internals of a condition system, how the handlers and restarts are constructed. My book describes that in detail twice: once, building a sample condition-like system piecewise, and then again, describing the implementation of a complete, ANSI-compliant condition system.