30 ms·
A solution is to use languages that make explicit control flow available, instead of pretending that exceptions are a good way of performing non-local jumps. H
by phoe-krk 6y ago
A solution is to use languages that make explicit control flow available, instead of pretending that exceptions are a good way of performing non-local jumps.
Have you investigated Common Lisp, its use of BLOCK/RETURN-FROM and TAGBODY/GO, and how it is possible to close over these lexical constructs to achieve non-local jumps to predefined points on the stack ? All of Common Lisp's error handling system is based on this primitive mechanism (and therefore written in Lisp itself).
(Disclosure: wrote a book on the topic.)