> Yeah, it's mind-blowing when it clicks, and makes the whole "exceptions vs. return types" discussion look like a quarrel of 3yos in a sand box. Error handling in other languages/runtimes just doesn't feel sufficient from now on.

I am still waiting for a non-Lisp language with a half-decent restart system. Even compiled languages should be able to implement it (except dealing with a possible allocation failure when saving the register context to return to)

ditto jdougan

"Restart. Start execution of the current method from the beginning. You can edit a method shown in the code pane, save it, and restart it!"

https://drcuis.github.io/TheCuisBook/The-Debugger.html

Restarts in CLHS are blocks of code handling a condition (exception). CL splits the "catch exception" and "react to it" parts into handlers and restarts. The two are independent; a handler can choose any restart currently installed above it in the call stack, or ask the user to choose interactively; the stack is only unwinded up to the point of a restart to resume from. This means you could e.g. following call stack:

5. Code that signals a file read error

4. Code that installs restarts "re-read line" and "skip line"

3. Code that loops over files in line

2. Code that installs restart "re-read file" or "abort"

1. Code with the handler that intelligently chooses whether to resume from 4 by re-reading a line or skipping it, or resume from 2 by attempting to read the file again, or just bailing out.

What is the issue with the system in Smalltalks?