At 15:02 -0700 98/06/12, Carl R. Witty wrote:
>And I agree with this list, except for infinite loops.  How will
>exceptions help make a program robust that otherwise might loop?

  There is no general method of finding the non-terminations (the problem
is proved unsolvable, I think), so from that generalistic point of view,
nothing will help, not exceptions, nor anything else.

  But one can think of scanning the code, and try to catch the most obvious
programming errors.

  When I tried to unify the different loop constructs of C++ semantically,
I found this version:
    loop { ... break; ... }
It has two components, "loop" which loops forever until it hits the "break".

  Now this construction can be implemented using exceptions: "loop" is
equivalent to
    try { ... throw Break; ...}
    catch (Break&) { ... }

  So there appears to be some relation between (imperative) loops and
exceptions.

  Hans Aberg
                  * Email: Hans Aberg <mailto:[EMAIL PROTECTED]>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>



Reply via email to