comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Parameter Modes, In In Out and Out
Date: Sun, 14 Jan 2001 14:33:59 GMT
Date: 2001-01-14T14:33:59+00:00	[thread overview]
Message-ID: <93sdcn$dr0$1@nnrp1.deja.com> (raw)
In-Reply-To: 3A6140CB.63EE9B8F@acm.org

In article <3A6140CB.63EE9B8F@acm.org>,
  Jeffrey Carter <jrcarter@acm.org> wrote:
> Brian Rogoff wrote:
> However, in the area of passing an access-to-subprogram value
> to a subprogram, there is no way to get around the rules.
> This is an unfortunate deviation from the basic philosophy.

"the basic philsophy"

The word "the" here is mischosen. The Ada design follows a
set of guidelines (basic philosophical principles if you
really want to get that grandiose), and what you refer to
is just one of them. Another is ease of implementation, and
in particular, an easy path for migration of Ada 83
technologies.

Tuck once said that he was dubious about the possibility of
adapting Ada 83 technology to Ada 95, and you will notice that
Averstar (Intermetrics) did indeed start from scratch rather
than adapt their previous Ada 83 technology. GNAT also started
from scratch, but that's a bit misleading, because there was
no production Ada 83 compiler on which GNAT could have been
built (Ada/Ed was a different kind of beast).

However, Tuck was pessimistic, we have seen that it is possible
to adapt Ada 83 technologies to Ada 95, and there is more than
one example, a notable example is the Rational technology.

A critical guideline (philosophical principle?) was that
existing Ada 83 runtime models be reusable as far as possible.

In the case of Unchecked_Access, it is trivial for an
implementation to omit a check, so that is no big deal.

But Unrestricted_Access (the GNAT attribute that gives Jeffrey
what he wants) is not just a matter of omitting a check, it
requires handling non-local references correctly. Now in the
case where you use a static link approach, as GNAT does (since
that's what gcc had chosen to use for GNU C), then it is indeed
trivial to implement Unrestricted_Access, and indeed for GNAT,
it is zero work, just a matter of omitting an accessibility
check.

But for run-time models using displays, implementing
Unrestricted_Access is tricky (one vendor at one Ada 95
meeting used stronger language, I believe "nightmare"
was the word used :-)

If you ask your vendor "Gee, I kind of like the ACT
Unrestricted_Access attribute, can you implement this, the
answer will hugely depend on whether displays or static
links are used".

So yes, the failure to provide this capability is uncomfortably
inconsistent with one guideline, but was at the time mandated
by another guideline.

Was it a good idea to have this restriction? Hard to say in
this particular case. It is certainly the case where
transitional implementation concerns of existing vendors
most specifically impacted the Ada 95 design in what I
think most people would say was a negative manner (certainly
we find that the 'Unrestricted_Access attribute is invaluable
in many contexts).

Robert Dewar
Ada Core Technologies


Sent via Deja.com
http://www.deja.com/



  reply	other threads:[~2001-01-14 14:33 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-06  0:11 Parameter Modes, In In Out and Out i.a.mcleod
2001-01-06  4:58 ` tmoran
2001-01-06 17:06   ` Robert Dewar
2001-01-06 19:50     ` tmoran
2001-01-06 20:31       ` Robert Dewar
2001-01-07  1:59     ` John English
2001-01-07  3:51       ` Robert Dewar
2001-01-08 12:06         ` dmitry6243
2001-01-09  4:32           ` Robert Dewar
2001-01-09 10:05             ` dmitry6243
2001-01-09  4:35           ` Robert Dewar
2001-01-09  9:58             ` dmitry6243
2001-01-09 14:13               ` Robert Dewar
2001-01-09 18:29                 ` dmitry6243
2001-01-09 19:55                   ` Robert Dewar
2001-01-10  0:47                     ` Brian Rogoff
2001-01-10 21:50                       ` Robert Dewar
2001-01-10  9:23                     ` dmitry6243
2001-01-10 21:46                       ` Robert Dewar
2001-01-11 11:46                         ` dmitry6243
2001-01-11 16:48                           ` Robert Dewar
2001-01-11 19:52                             ` Thierry Lelegard
2001-01-11 20:10                               ` Pascal Obry
2001-01-12  8:05                                 ` Florian Weimer
2001-01-12 13:31                               ` gasperon
2001-01-12 14:02                                 ` n_brunot
2001-01-12 17:26                                   ` charlet
2001-01-14 18:23                                     ` n_brunot
2001-01-14 21:05                                       ` Robert Dewar
2001-01-15  8:56                                         ` n_brunot
2001-01-12 11:05                             ` dmitry6243
2001-01-12 13:55                               ` Robert Dewar
2001-01-12 22:10                                 ` Dale Stanbrough
2001-01-13  1:13                                   ` Robert Dewar
2001-01-13 17:29                                 ` dmitry6243
2001-01-13 18:22                                   ` Robert Dewar
2001-01-13 22:32                                     ` Brian Rogoff
2001-01-14  6:02                                       ` Jeffrey Carter
2001-01-14 14:33                                         ` Robert Dewar [this message]
2001-01-14 18:14                                           ` Jeffrey Carter
2001-01-14 21:10                                             ` Robert Dewar
2001-01-14 20:45                                         ` Brian Rogoff
2001-01-14 14:23                                       ` Robert Dewar
2001-01-14 20:42                                         ` Brian Rogoff
2001-01-14 21:17                                           ` Robert Dewar
2001-01-15 20:57                                             ` Brian Rogoff
2001-01-15 16:25                                     ` dmitry6243
2001-02-02  7:06                                       ` Multiple dispatch (was " mark_lundquist
2001-02-02 13:49                                         ` dmitry6243
2001-01-16 12:22                                 ` Georg Bauhaus
2001-01-13  4:46                           ` Larry Kilgallen
     [not found]                           ` <93ko49$auq$1@nnrp1.deja.coOrganization: LJK Software <eiviJtYj+A7W@eisner.decus.org>
2001-01-13  6:00                             ` Robert Dewar
2001-01-11 21:38               ` mark_lundquist
2001-01-12  0:20                 ` John English
2001-01-12 13:57                   ` Robert Dewar
2001-01-12 20:34                     ` mark_lundquist
2001-01-13 18:06                       ` Brian Rogoff
2001-01-11 21:28             ` mark_lundquist
2001-01-12 12:35               ` dmitry6243
2001-01-12 21:22                 ` mark_lundquist
2001-01-13  1:16                   ` Robert Dewar
2001-02-02  5:42                     ` mark_lundquist
2001-02-02 14:55                       ` Stephen Leake
2001-02-02 20:08                         ` Robert Dewar
2001-02-05 15:00                           ` Stephen Leake
2001-01-13 21:26               ` Jean-Pierre Rosen
2001-01-11 21:24           ` mark_lundquist
2001-01-12 12:13             ` dmitry6243
2001-01-06 16:21 ` Jean-Pierre Rosen
2001-01-09 15:15   ` Thierry Lelegard
2001-01-10 21:53     ` Robert Dewar
2001-01-07 19:15 ` DuckE
2001-01-09 20:44 ` Laurent Guerby
2001-01-09 21:46   ` Florian Weimer
2001-01-10 21:57   ` Robert Dewar
2001-01-10 23:51     ` Tucker Taft
2001-01-11  4:23       ` Robert Dewar
2001-01-11 19:28     ` Laurent Guerby
2001-01-18 18:53 ` FAROOQATIF
replies disabled

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