News for hackers. Stuff that matters.
Re:The Common Lisp Condition System – Upcoming Book by Akronymus on Wednesday July 15, 2020 @11:07AM (#23846229)
Is this a consequence of the "mythical" treating code as data that lisp is often praised for?
Re:The Common Lisp Condition System – Upcoming Book by phoe-krk on Wednesday July 15, 2020 @11:13AM (#23846334)
Not at all. It is a consequence of language design of other languages.

When you divide by zero in Java, then there is nothing set in stone that prevents the language from winding the stack further and executing some code that will analyze the dynamic environment in which the error happened, calling all error handlers found in the dynamic environment, and only then - if no handler transferred control outside the error side - either entering an interactive debugger of some sorts or giving up and crashing.

But instead Java goes another way and immediately destroys the stack by throwing an exception. That's a design choice made by Java creators. Lisp's homoiconicity has nothing to do with this.

You can also analyze the Python implementation of the condition system posted elsewhere in the comments - that's an example of a condition system in a non-homoiconic language.

Re:The Common Lisp Condition System – Upcoming Book by Akronymus on Wednesday July 15, 2020 @11:24AM (#23846552)
Thanks for explaining that to me. It is all just so alien to me due to my experience so far. But I am really excited to learn it properly.
Re:The Common Lisp Condition System – Upcoming Book by phoe-krk on Wednesday July 15, 2020 @11:26AM (#23846603)
Using the word "alien" in context of a language often described as "made with alien technology" sounds peculiarly fitting.

The image-based Lisp is just very very different when compared to mainstream batch languages like C, Rust, or Java.

Re:The Common Lisp Condition System – Upcoming Book by Akronymus on Wednesday July 15, 2020 @12:13PM (#23847352)
Foreign implies a sort of familiarity/similarity to what you know. Hence me using alien as it is different enough, to basically be, well, alien.

But that only wants to make me learn it properly more.