Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-05-28 06:59:39


Andreas Huber <ah2003_at_[hidden]> writes:

>> GC'd language, for the most part, you wouldn't devote any exit
                  ^^^^^^^^^^^^^^^^^
>> action code to resource releases.
>
> Please read my followup to Daves post. There I explain why you would need exit
> actions to release resources even if we had GC. The problem with GC is that it

That's why I wrote "for the most part". You misinterpreted me and the
whole thing about GC turned into a big distraction. Exit actions are
no different from entry actions and transition actions from an
abstract POV in an FSM. They have equal status, and there's no
reason at all to restrict whether one of them can throw exceptions,
not least the one that executes *first*.

IMO your error handling model is too complicated to reason about
easily, that complexity is making it hard for you to see its flaws.
But complexity of an error-handling model is a flaw in itself. Error
handling is hard enough to get right in principle with a simple model.
Simplify, simplify, simplify.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk