4 ms·
The CL condition system is completely orthogonal to any concept of continuations or stack unwinding. Both condition handlers and restarts are plain functions an
by dfox 7y ago
The CL condition system is completely orthogonal to any concept of continuations or stack unwinding. Both condition handlers and restarts are plain functions and any kind of stack unwinding has to be implemented inside these functions (by means of TAGBODY/GO, BLOCK/RETURN-FROM or THROW/CATCH).
- hencq 7y agoTo add to that, as an example, here's how you could implement something similar in Clojure [1]. It just relies on dynamic scope to run the handler without unwinding the stack. [1] https://gist.github.com/msgodf/6f4e43c112b8e89eee3d https://gist.github.com/msgodf/6f4e43c112b8e89eee3d
- lilactown 7y agowhat's the difference from what you said (handlers and restarts are functions) vs. a continuation, which could ostensibly just be a function that has closed over the state of the runtime before the condition was triggered?