[e-lang] Non-local Exits vs Defensive Consistency - David Hopwood

David Wagner daw at cs.berkeley.edu
Mon Jan 29 02:18:36 CST 2007


David Hopwood writes:
>What is needed to make defensively consistent programming tractable in
>the presence of non-local exits, is that "only calls that exit normally
>have significant side-effects". I will call this the Very Strong Exit
>Guarantee (since it is stronger than what the C++ community calls the
>"Strong Exception Guarantee").

Can you explain how this differs from the C++ community's notion of
strong exception-safety?  It sounds the same to me: I thought that C++
folks used strong exception-safety to refer to calls that have no effects
if they throw an exception.  They also use "commit-or-rollback" as a
synonym for strong exception-safety.

http://www.boost.org/more/generic_exception_safety.html


P.S. Incidentally, here is a fascinating article I ran into on the topic
of interactions between exception-safety and pure functions in C++:

http://erdani.org/publications/cuj-2003-12.pdf

It talks about strongly exception-safe methods, pure methods, and "no-throw"
methods (methods that can never throw any exception), and shows how they are
interrelated.  Start at the section on p.2 labelled "Purity and Exception
Safety".


More information about the e-lang mailing list