Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Smalltalk probably supports this as well, but what's cool about Common Lisp's condition system is that it doesn't depend on user interaction or debugger to work. Conditions let you separate the code making the decision about how to handle an error from actual error handling. The decision doesn't have to involve interactive debugger, you can have your code making the choice about which restart (unit of error handling code) to invoke. The common use case is that you install various restarts as you go down the call stack; then, when an exception happens, control goes up the stack until appropriate decision code, which selects restart, and control goes back down the call stack to the selected restart block.

It's an incredibly flexible system that makes exception handling much more useful.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: