Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-02-11 12:05:33


Ion Gaztañaga wrote:
> I won't discuss that RAII is very convenient and useful. I use RAII very
> often and I try to avoid try/catch using destructors to free resources.
> But this is like problem like providing mutex locks ONLY through
> lockers. In some sw small enterprises I know (mine included), exceptions
> are not recommended (allowed) in the code. That can be because of
> misinformation but that's the reality. Even some programmers (I'm one of
> them), don't like exception model at all. And I agree with you that I
> need more documentation with two phase construction. Do you think that
> providing both methods will lead programmers to the "bad way"?
>

100% agreement from my side!

Your current design is the only clean way to allow the user to choose whether to use exceptions or not. As said in my review, your documentation misses to menion this intent.

RAII can be implemented as a matter of minutes in form of a convenience wrapper. So I really don't get the point of this discussion.

Just my €-,02.

Regards,

Tobias


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