comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: Safety of the Booch Ada 95 Components
Date: 1999/12/12
Date: 1999-12-12T00:00:00+00:00	[thread overview]
Message-ID: <x7vr9gswe7o.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: 1e2lkpj.jfhkndlca1p6N%herwin@gmu.edu

herwin@gmu.edu (Harry Erwin) writes:

> Matthew Heaney <matthew_heaney@acm.org> wrote:
> 
> >   procedure Copy
> >     (From : in     Source_Type;
> >      To   : in out Target_Type) is
> >   begin
> >     if From'Address = To'Address then
> >       return;  -- do nothing, because From is same object as To
> >     end if;
> 
> That's missing from the code I've been looking at.

Yes, a clear defect, logged.

> Strong exception-safety == supports commit/rollback semantics.

Is that a standard definition?

> Apparently in the Booch components, if the copy goes bad, the To
> container has been cleared and is partially written. Basic exception
> safety (== the container is still useable) is probably supported.

Yes, this is the case for the Copy operation (which is *not* the
standard assignment operation!).

In a previous reply, I quoted the ALRM [7.6(17)] on controlled
assignment. I must say I don't fully understand from that what is
expected. At first (& nth) sight I don't see how one could achieve
your idea of strong exception safety.

I wonder what happens in C++ STL-based programming if operator new
fails in the middle of things?




  reply	other threads:[~1999-12-12  0:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-10  0:00 Safety of the Booch Ada 95 Components Harry Erwin
1999-12-10  0:00 ` Simon Wright
1999-12-12  0:00   ` Simon Wright
1999-12-12  0:00     ` Matthew Heaney
1999-12-12  0:00   ` Harry Erwin
1999-12-13  0:00     ` Simon Wright
1999-12-10  0:00 ` Matthew Heaney
1999-12-10  0:00   ` Hyman Rosen
1999-12-10  0:00     ` Harry Erwin
1999-12-10  0:00     ` Matthew Heaney
1999-12-11  0:00       ` Harry Erwin
1999-12-12  0:00         ` Robert Dewar
1999-12-12  0:00           ` Harry Erwin
1999-12-13  0:00           ` Kent Paul Dolan
1999-12-13  0:00             ` Robert I. Eachus
1999-12-13  0:00             ` Simon Wright
1999-12-13  0:00             ` Ted Dennison
1999-12-13  0:00       ` Hyman Rosen
1999-12-13  0:00         ` Robert I. Eachus
1999-12-14  0:00           ` Simon Wright
1999-12-15  0:00             ` Mats Weber
1999-12-17  0:00               ` Simon Wright
1999-12-15  0:00             ` Harry Erwin
1999-12-14  0:00         ` Matthew Heaney
1999-12-10  0:00   ` Harry Erwin
1999-12-12  0:00     ` Simon Wright [this message]
1999-12-12  0:00       ` Harry Erwin
1999-12-13  0:00         ` Simon Wright
1999-12-13  0:00 ` Tucker Taft
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox