On Fri, Apr 05, 2002 at 01:02:44PM +1000, Allan Rae wrote:
> It would seem you are referring to:
> http://www.gotw.ca/gotw/059.htm
> as the obscure theory behind these arguements.
> 
> At least now I can see a reason instead of just drug induced ravings.

There is certainly something good in exception safety, and in general it
is a worthy goal.

However, it must be seen in the context of other 'worthy goals'. One of
them is short code. To get ES one has to write code that otherwise could be
created by the compiler. While operator=() is straightforward and could be
created by copy&paste with compiler detectible errors, swap is not (and in
fact, incorrect implementations of swap() have already bitten me)

Pimpls do not come for free, either. In the case of LyX, the cost for
running times are certainly negligible, but then we have to ask ourself
also what benefit ES will give us.

Personally, I don't see any that is worth the additional amount of code.

If there were language/compiler support for ES like auto generated swap or
automatic operator=() that use ES idioms, I'd certainly very much in favour
of it. But not now.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to