
David Abrahams wrote:
Tobias Schwinger <tschwinger@neoscientists.org> writes:
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!
Well, I don't generally dislike the exception model...
Your current design is the only clean way to allow the user to choose whether to use exceptions or not.
Really, the ONLY clean way? Are you confident you've imagined all possibilities?
;-) Granted, maybe not. s/only/a/ Still, your "#ifdef suggestion" seems much worse to me -- it might have been just provocative rhetoric rather than a serious proposal, I guess... Regards, Tobias