{"id":2200,"date":"2020-11-08T16:08:08","date_gmt":"2020-11-08T10:38:08","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=2200"},"modified":"2020-12-10T06:48:25","modified_gmt":"2020-12-10T01:18:25","slug":"book-review-the-common-lisp-condition-system-beyond-exception-handling-with-control-flow-mechanisms","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2020\/11\/08\/book-review-the-common-lisp-condition-system-beyond-exception-handling-with-control-flow-mechanisms\/","title":{"rendered":"Book Review &#8211; The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms."},"content":{"rendered":"<p><span style=\"color: #0000ff;\"><em><strong>Title:<\/strong><\/em><\/span> The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>Author:<\/strong><\/em><\/span> Micha\u0142 &#8220;phoe&#8221; Herda<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>Publisher:<\/strong><\/em><\/span> Apress<\/p>\n<p><span style=\"color: #0000ff;\"><em><strong>Year:<\/strong><\/em><\/span> 2020<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page.png?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2201\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2020\/11\/08\/book-review-the-common-lisp-condition-system-beyond-exception-handling-with-control-flow-mechanisms\/cover-page\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page.png\" data-orig-size=\"759,1087\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page-715x1024.png\" class=\" wp-image-2201 alignleft\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page.png?resize=135%2C194&#038;ssl=1\" alt=\"\" width=\"135\" height=\"194\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page.png?resize=209%2C300&amp;ssl=1 209w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page.png?resize=715%2C1024&amp;ssl=1 715w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Cover-page.png?w=759&amp;ssl=1 759w\" sizes=\"(max-width: 135px) 100vw, 135px\" \/><\/a>Unlike with other languages, it is rare to find new books being published on <em><strong>Lisp<\/strong><\/em>. The last book on <em><strong>Lisp<\/strong><\/em>, which I purchased was <a href=\"https:\/\/www.rangakrish.com\/index.php\/2016\/03\/15\/book-review-common-lisp-recipes-by-edi-weitz\/\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>\u201cCommon Lisp Recipes\u201d<\/strong><\/em><\/a><span class=\"Apple-converted-space\">\u00a0<\/span>\u00a0by <em><strong>Edmund Weitz<\/strong><\/em> in March 2016. After a huge gap of over 4 years, there is this new book by <em><strong>Micha\u0142 &#8220;phoe&#8221; Herda<\/strong><\/em>\u00a0and I got it last week. What better way to enjoy the Holiday season than spending quality time reading a good <em><strong>Lisp<\/strong><\/em> book!<\/p>\n<p>As the title says, this book is about <em><strong>Common Lisp\u2019s Condition System<\/strong><\/em>. I am comfortable programming in <em><strong>Lisp<\/strong><\/em>\u00a0and the <em><strong>Condition System<\/strong><\/em> is not new to me. So when I ordered the book, I was thinking \u201cWhat is this fuss about? What is there in the Condition System that warrants an entire book?\u201d<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>I am really glad I got the book! It is packed with so much insight and information that every <em><strong>Lisp<\/strong><\/em> programmer will learn something new from it. Honestly, I did.<\/p>\n<p>The <em><strong>Condition System<\/strong><\/em> in <em><strong>Common Lisp<\/strong><\/em> is loosely similar to the exception handling mechanisms in languages such as <em><strong>C++<\/strong><\/em> and <em><strong>Java<\/strong><\/em>, but is much more expressive, elegant and powerful. Reading this book will definitely reinforce this point.<\/p>\n<p><em><strong>Chapter 1<\/strong><\/em> covers the necessary low-level concepts that are required to understand the <em><strong>Condition System<\/strong><\/em>. This chapter is a must-read for people coming from other programming languages. The author starts with<span class=\"Apple-converted-space\">\u00a0 <\/span>a simple <em><strong>C<\/strong><\/em> program and gradually builds up the notions of <em><strong>\u201cDynamic Variables\u201d<\/strong><\/em>, <em><strong>\u201cLexical Closure\u201d<\/strong><\/em> and shows how these ideas are important in the context of non-local transfer of control.<\/p>\n<p><em><strong>Chapter 2<\/strong><\/em> introduces the <em><strong>Condition System<\/strong><\/em>. This is the lengthiest chapter in the book. The author<span class=\"Apple-converted-space\">\u00a0 <\/span>first describes several examples of a <em><strong>\u201chook\u201d-<\/strong><\/em>based approach for extending system behaviour and then introduces condition handlers in a carefully graded manner. All the examples are well chosen and expose the nuances of the exception handling mechanism. This chapter also highlights another unique feature of the <em><strong>Lisp<\/strong><\/em> language, where the <em><strong>Debugger<\/strong><\/em> gets control when other things fail, allowing the programmer to interactively choose an appropriate <em><strong>Restart<\/strong><\/em>. A beginner might feel intimidated by the amount of detail in this chapter, but I feel it is unavoidable.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p><em><strong>Chapter 3<\/strong><\/em>, in my opinion, is the most engaging part in the book. Here, the author describes the complete implementation of a <em><strong>\u201cPortable Condition System\u201d<\/strong><\/em> that conforms to the <em><strong>ANSI<\/strong><\/em>\u00a0<em><strong>Standard<\/strong><\/em>, and the source code is available for download and further study.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p><em><strong>Chapter 4<\/strong><\/em>, provides a logical conclusion to the concepts discussed in the earlier chapters. Here, the author discusses some philosophical issues and possible downsides of the <em><strong>Condition System<\/strong><\/em>. Towards the end, he touches upon a few interesting use cases of the <em><strong>Condition System<\/strong><\/em> beyond exception handling, including a <em><strong>Testing library<\/strong><\/em>, a <em><strong>Web framework<\/strong><\/em>, and a <em><strong>Python-like generator<\/strong><\/em>. <span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p><em><strong>Chapter 5<\/strong><\/em>, the final chapter, is a collection of reference material organised in the form of <em><strong>Appendixes<\/strong><\/em>. One of them is an overview of <em><strong>Lisp macros<\/strong><\/em>. This is a useful addition because a lot of interesting <em><strong>Lisp<\/strong><\/em> code uses macros.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p><em><strong>Appendix E<\/strong> <\/em>contains some additional material that did not make into the book and <em><strong>Appendix F<\/strong><\/em> contains errata. These are available <a href=\"https:\/\/github.com\/Apress\/common-lisp-condition-system\" target=\"_blank\" rel=\"noopener noreferrer\"><strong><em>online<\/em><\/strong><\/a>. (Thanks to the author for bringing this to my attention.)<\/p>\n<p>Every <em><strong>Lisp<\/strong><\/em> programmer must read this book, and if necessary, multiple times. I will even go further and appeal to designers and developers of other programming languages to go through the book as well.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>Of course, <em><strong>Lisp<\/strong><\/em> is such an adorable language. There is a lot that one can learn (and continue to learn)<span class=\"Apple-converted-space\">\u00a0 <\/span>from it!<\/p>\n<p>Have a nice weekend and a great week ahead!<\/p>\n<p><span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Title: The Common Lisp Condition System: Beyond Exception Handling with Control Flow Mechanisms Author: Micha\u0142 &#8220;phoe&#8221; Herda Publisher: Apress Year: 2020 Unlike with other languages, it is rare to find new books being published on Lisp. The last book on Lisp, which I purchased was \u201cCommon Lisp Recipes\u201d\u00a0\u00a0by Edmund Weitz in March 2016. After a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,18,17],"tags":[110,253,254],"class_list":["post-2200","post","type-post","status-publish","format-standard","hentry","category-book-review","category-lisp","category-programming","tag-common-lisp","tag-condition-system","tag-exception-handling"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-zu","jetpack-related-posts":[{"id":2927,"url":"https:\/\/www.rangakrish.com\/index.php\/2022\/10\/20\/why-learn-lisp\/","url_meta":{"origin":2200,"position":0},"title":"Why Learn Lisp?","author":"admin","date":"October 20, 2022","format":false,"excerpt":"In the last article, I had shared my views on why programmers should learn Prolog, preferably as the first language. What language should one learn next? I strongly pitch for Lisp, to be precise, \u201cCommon Lisp\u201d. Lisp happens to be the second oldest (1958) programming language, only after Fortran (1957)!\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4166,"url":"https:\/\/www.rangakrish.com\/index.php\/2026\/03\/06\/beyond-try-catch-common-lisps-restart-system\/","url_meta":{"origin":2200,"position":1},"title":"Beyond Try-Catch: Common Lisp&#8217;s Restart System","author":"admin","date":"March 6, 2026","format":false,"excerpt":"Popular programming languages such as C++, Java and Python include one mechanism for error handling: throw an exception and hope someone above in the call stack knows what to do. This is no doubt a powerful mechanism, but Common Lisp, decades ago, built something far more powerful in its place.\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Processing a Number","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/03\/code1-300x188.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/03\/code1-300x188.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/03\/code1-300x188.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":190,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/03\/15\/book-review-common-lisp-recipes-by-edi-weitz\/","url_meta":{"origin":2200,"position":2},"title":"Book Review: Common Lisp Recipes &#8211; A Problem-Solution Approach","author":"admin","date":"March 15, 2016","format":false,"excerpt":"Last Saturday (March 12, 2016), I got my most eagerly awaited book from Amazon.com. Yes, I am talking about Common Lisp Recipes: A Problem-Solution Approach\u00a0authored by Dr.Edmund Weitz. Of course, if you have been programming in Lisp for a couple of years, you would have definitely heard of Dr.Edi Weitz,\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2377,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/04\/12\/book-review-programming-algorithms-in-lisp\/","url_meta":{"origin":2200,"position":3},"title":"Book Review: Programming Algorithms in Lisp","author":"admin","date":"April 12, 2021","format":false,"excerpt":"Title: Programming Algorithms in Lisp: Writing Efficient Programs with Examples in ANSI Common Lisp Author: Vsevolod Domkin Publisher: Apress Year: 2021 It is only about 5 months since I read and reviewed\u00a0a good book on Lisp written by Micha\u0142 \u201cphoe\u201d Herda. The present book is by Vsevolod Domkin\u00a0and I purchased\u2026","rel":"","context":"In &quot;Book Review&quot;","block_context":{"text":"Book Review","link":"https:\/\/www.rangakrish.com\/index.php\/category\/book-review\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/04\/Book-Cover-209x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":70,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/11\/13\/aspect-oriented-programming-and-lisp\/","url_meta":{"origin":2200,"position":4},"title":"Aspect-Oriented Programming and Lisp","author":"admin","date":"November 13, 2015","format":false,"excerpt":"Aspect-oriented programming (AOP) is a popular approach to handle cross-cutting concerns in an application. Common examples of cross-cutting functionality are Logging, Error Handling and Transaction Management. AspectJ\u00a0is the original AOP extension created for Java in 2001.\u00a0AOP extensions have been developed\u00a0for some\u00a0other languages also. There are many good books and online\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Lisp Method Combination","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/11\/Lisp-Method-Combination-1.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/11\/Lisp-Method-Combination-1.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2015\/11\/Lisp-Method-Combination-1.jpg?resize=525%2C300 1.5x"},"classes":[]},{"id":41,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/10\/08\/learning-lisp-resources\/","url_meta":{"origin":2200,"position":5},"title":"Learning LISP &#8211; Resources","author":"admin","date":"October 8, 2015","format":false,"excerpt":"During my talks on Lisp Programming, I am invariably asked to suggest good books to start learning the language. Here is a (partial) list that I readily recommend. Beginner Level: ANSI Common Lisp, Paul Graham, Prentice Hall, 1996. Common LISP: A Tutorial, Wendy L.Milner, Prentice Hall, 1988. Land of LISP:\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2200","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=2200"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2200\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=2200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=2200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=2200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}