3 ms·
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
by guenthert 6y ago
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-conditions-and-restarts.html 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.
- phoe-krk 6y agoThe 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.