2 ms·
Why not conditions and restarts as Lisp does it? Lisp bakes it into the language, but it's not impossible to implement in Java (or Blub X of choice..) according
by agentultra 15y ago
Why not conditions and restarts as Lisp does it? Lisp bakes it into the language, but it's not impossible to implement in Java (or Blub X of choice..) according to Peter Siebel (see his google talk).
The one thing that makes working with exceptions is that when one is encountered the stack is unwound up to the first matching handler (and possibly just passed off to the next one, etc). You can lose a lot of state this way and it makes restarting computations difficult (or even deciding what to do in some cases).
Using exceptions just requires careful planning and I think conditions and restarts are a much more elegant way of solving the problem.