comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@schonberg.cs.nyu.edu (Robert Dewar)
Subject: Re: Q. on Automatic Package Finalization
Date: 1996/10/04
Date: 1996-10-04T00:00:00+00:00	[thread overview]
Message-ID: <dewar.844452822@schonberg> (raw)
In-Reply-To: 32552646.F27@watson.ibm.com


Norm Cohen says

> ">   begin
> >      ...
> >   exception
> >      ...
> >   at end
> >      < sequence of frame finalization statements >
> >   end"
>
> Interestingly, internally GNAT implements at end, but does not allow it
> to be mixed with an exception handler, and at end, unlike an exception
> handler, covers the associated declarations.

Both those differences detract from the value of "at end".


I don't think so. After all it is a trivial syntactic transformation to
go from whatever you have in mind to the semantics implemented by GNAT
(which corresponds to the standard GCC cleanup semantics).

The reason for not allowing at end and exceptions in the same scope was
simply for clarity, this makes it very clear what the semantics is whereas
if you have to allow both, then you have to answer questions like
what happens if an exception happens in the finalization?

The reason we cover the declarations is two-fold, first for almost all
internal uses of the construct (and of course it is ONLY an internal
use construct at the moment), this is more convenient, and second, as
I noted, it corresponds to the GCC cleanup notion.

But anyway, the first point I made is the critical one, you can transform
one semantics into the other trivially, so what's the issue?





  reply	other threads:[~1996-10-04  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-28  0:00 Q. on Automatic Package Finalization Robert Dewar
1996-10-04  0:00 ` Norman H. Cohen
1996-10-04  0:00   ` Robert Dewar [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-09-28  0:00 Robert Dewar
1996-10-04  0:00 ` Norman H. Cohen
1996-10-06  0:00   ` Robert Dewar
1996-09-22  0:00 david scott gibson
1996-09-23  0:00 ` Robert Dewar
1996-09-24  0:00   ` Norman H. Cohen
1996-09-24  0:00     ` Tucker Taft
1996-09-25  0:00   ` Jens Jakob Jensen
1996-09-25  0:00   ` Norman H. Cohen
replies disabled

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