comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: How to prevent 'Unchecked_Access
Date: 1996/10/23
Date: 1996-10-23T00:00:00+00:00	[thread overview]
Message-ID: <Dzqy76.4F6@world.std.com> (raw)
In-Reply-To: 54jarn$1rp@fozzie.sun3.iaf.nl


In article <54jarn$1rp@fozzie.sun3.iaf.nl>,
Geert Bosch <geert@fozzie.sun3.iaf.nl> wrote:
>Isn't there a way to express this safe behavior at the subprogram, so
>they can be used without using Unchecked_Access. A pragma specifying
>that an access-type parameter is limited would seem logical.

An earlier version of Ada 9X had limited access types.  The feature was
removed, primarily to simplify the language and keep the number of
changes smaller.  It wasn't anything against that feature in particular,
as far as I remember.

Well, there was something in particular against limited
access-to-subprogram types.  That's been discussed to death on this
newsgroup.

Access parameters can do more-or-less what you want, in many cases.  You
can take 'Access (instead of 'Unchecked_Access), and pass it to an
access parameter, and as long as the called subprogram doesn't do
anything evil (like assigning it into a global), all is well --
otherwise you get a run-time error.

- Bob




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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-22  0:00 How to prevent 'Unchecked_Access Geert Bosch
1996-10-23  0:00 ` Robert A Duff [this message]
replies disabled

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