Hacker News new | ask | show | jobs
by aufreak3 4415 days ago
> Are there any other languages that allow the calling scope to specify how lower-level functions handle errors without unwinding the stack?

another possible answer - Erlang.

While the look of the condition/restart scheme may be very different, such a condition/restart protocol can be implemented as message passing with a known global "condition handler" process I think.

A "raise" function can be implemented as a message-send to the condition handler process followed by an immediate wait-for-response. The handler process may terminate the raising process, replace its value with something, etc. depending on the installed handlers.