comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Subverting 'Access for Sub-programs
Date: 1999/08/05
Date: 1999-08-05T00:00:00+00:00	[thread overview]
Message-ID: <7ocrnv$sf2$1@nnrp1.deja.com> (raw)
In-Reply-To: wcczp06jj39.fsf@world.std.com

In article <wcczp06jj39.fsf@world.std.com>,
  Robert A Duff <bobduff@world.std.com> wrote:
> The language ended up with call backs, but not downward
> closures.

Not inappropriate, because call backs were the new feature not
considered in the design of Ada 83. The downward closure issue
has not changed at all from the design of Ada 83, and in fact
it was not clear there was a sufficiently good reason to
embroider in this area.

> Your comment is, of course, also true of what we ended up with
> 'Unrestricted_Access, which is neither safe nor portable --
> it's even less checked than 'Unchecked_Access.

Well that's a bit confused. There is no Unchecked_Access for
subprograms, so I am not quite sure what the comparison would
mean there ...

For other than subprograms, Unrestricted_Access is equivalent to
(though preferable to, since more checked) than taking 'Address
followed by an unchecked conversion. It is to that construct
that Unrestricted_Access should be compared, not
Unchecked_Access.

The fact of the matter is that even with the design teams
proposals, there are still cases where Unrestricted_Access
would be useful for subprograms, since there are cases which
are safe, but the compiler cannot tell they are safe.

To me the dangling data references of Unchecked_Access are not
particularly better than the dangling subprogram pointers of
Unrestricted_Access. The consequence of either is possible
data corruption (in the former case, from a bad address, in
the latter case from a bad static link).

Note that Unrestricted_Access applied to an inner procedure with
no non-local references is in fact entirely safe (such nested
procedures are not at all uncommon, they are used in cases where
you want to restrict the visibility of a local nested
subprogram).


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




  parent reply	other threads:[~1999-08-05  0:00 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-03  0:00 Subverting 'Access for Sub-programs Anton Gibbs
1999-08-03  0:00 ` Brian Rogoff
1999-08-03  0:00 ` Michael F. Yoder
1999-08-03  0:00 ` David C. Hoos, Sr.
1999-08-05  0:00   ` Robert A Duff
1999-08-03  0:00 ` Ted Dennison
1999-08-03  0:00 ` tmoran
1999-08-03  0:00 ` Steve Doiel
1999-08-04  0:00 ` Anton Gibbs
1999-08-04  0:00   ` Jean-Pierre Rosen
1999-08-04  0:00     ` Brian Rogoff
1999-08-05  0:00       ` Jean-Pierre Rosen
1999-08-05  0:00         ` Robert A Duff
1999-08-05  0:00           ` Brian Rogoff
1999-08-06  0:00             ` Robert Dewar
1999-08-09  0:00               ` Tucker Taft
1999-08-10  0:00                 ` Robert Dewar
1999-08-11  0:00                   ` Tucker Taft
1999-08-13  0:00                     ` Robert Dewar
1999-08-13  0:00                     ` Robert Dewar
1999-08-13  0:00                       ` Brian Rogoff
1999-08-11  0:00                   ` Robert A Duff
1999-08-11  0:00                     ` Robert Dewar
1999-08-11  0:00                   ` Dmitry A. Kazakov
1999-08-11  0:00                     ` Robert Dewar
1999-08-12  0:00                       ` Dmitry A. Kazakov
1999-08-14  0:00                         ` Robert Dewar
1999-08-16  0:00                           ` Dmitry A. Kazakov
1999-08-11  0:00                     ` Richard D Riehle
1999-08-05  0:00           ` tmoran
1999-08-06  0:00             ` Robert A Duff
1999-08-05  0:00           ` Robert Dewar [this message]
1999-08-05  0:00         ` adam
1999-08-05  0:00           ` adam
1999-08-06  0:00             ` Robert A Duff
1999-08-06  0:00               ` adam
1999-08-09  0:00                 ` Robert A Duff
1999-08-09  0:00                 ` Mark Biggar
1999-08-05  0:00           ` Robert Dewar
1999-08-05  0:00             ` What is a Display ? (was: Subverting 'Access for Sub-programs) Larry Kilgallen
1999-08-05  0:00               ` Hyman Rosen
1999-08-06  0:00                 ` Robert Dewar
1999-08-06  0:00               ` Robert Dewar
1999-08-06  0:00         ` Subverting 'Access for Sub-programs Brian Rogoff
1999-08-07  0:00           ` Gautier
1999-08-05  0:00     ` Robert A Duff
1999-08-05  0:00       ` Robert Dewar
1999-08-05  0:00         ` Brian Rogoff
1999-08-04  0:00   ` Robert A Duff
1999-08-04  0:00     ` Brian Rogoff
1999-08-05  0:00       ` tmoran
1999-08-05  0:00         ` Aidan Skinner
1999-08-05  0:00         ` Robert Dewar
1999-08-05  0:00           ` Ray Blaak
1999-08-06  0:00             ` Jean-Pierre Rosen
1999-08-06  0:00               ` Hyman Rosen
1999-08-07  0:00                 ` Florian Weimer
1999-08-06  0:00             ` Robert Dewar
1999-08-06  0:00               ` Robert A Duff
1999-08-08  0:00                 ` Brian Rogoff
1999-08-09  0:00                   ` Robert A Duff
1999-08-10  0:00                     ` Brian Rogoff
1999-08-09  0:00                 ` Tucker Taft
1999-08-05  0:00     ` Anton Gibbs
1999-08-05  0:00   ` Steve Quinlan
1999-08-04  0:00 ` Robert Dewar
1999-08-04  0:00   ` Robert A Duff
1999-08-04  0:00     ` Robert Dewar
replies disabled

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