From: Adam Beneschan <adam@irvine.com>
Subject: Re: Access keyword
Date: Wed, 30 Apr 2008 08:20:17 -0700 (PDT)
Date: 2008-04-30T08:20:17-07:00 [thread overview]
Message-ID: <2cc577f4-704a-4235-aad4-a29186309c02@k10g2000prm.googlegroups.com> (raw)
In-Reply-To: aa25f91b-4602-42ad-8634-c3b11c152288@2g2000hsn.googlegroups.com
On Apr 30, 12:15 am, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> On 29 Kwi, 23:32, "Randy Brukardt" <ra...@rrsoftware.com> wrote:
>
> > Anonymous access types (a superset of access parameters) mainly exist in Ada
> > to make it easier for C++ and Java programmers to move their rotten designs
> > to Ada.
>
> Anonymous access types are used by Ada.Containers for iteration (among
> others). "Rationale" by Barnes presents some nice examples with
> downward closures as well.
I suspect that Randy was talking only about anonymous access-to-object
parameters. Those aren't used by the language's definition of
Ada.Containers, or at least I didn't spot any.
Anonymous access-to-subprogram parameters (which Ada.Containers does
use) are a different animal altogether. They do serve a legitimate
purpose; downward closures are important but couldn't be done
satisfactorily in Ada 95. In a way, I think that calling this an
"access" parameter is more of a syntax choice than a real "access"
thingy. Anonymous access-to-subprogram parameters can't be stored in
variables and thus don't really serve the same purposes as other
access types; for that reason, I think the designers could have done
this without an "access" type, simply by saying they would pass a
procedure or function around, as is done in Algol and Pascal, I
believe. But doing it as an access type fits in well with the
language rules and syntax that already existed in Ada 95. Just my
humble opinion here...
[Apologies if this is a duplicate post... Google Groups, which is
apparently written in C++, was not behaving right...]
-- Adam
next prev parent reply other threads:[~2008-04-30 15:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 13:55 Access keyword Sébastien
2008-04-29 14:35 ` Peter Hermann
2008-04-29 14:43 ` Ludovic Brenta
2008-04-29 15:16 ` stefan-lucks
2008-04-29 16:31 ` Sébastien
2008-04-29 19:55 ` Gautier
2008-04-30 14:26 ` Sébastien
2008-04-30 17:13 ` Gautier
2008-04-30 20:44 ` Ludovic Brenta
2008-04-29 17:37 ` Adam Beneschan
2008-04-29 19:08 ` Jeffrey R. Carter
2008-04-29 21:03 ` Maciej Sobczak
2008-04-29 21:32 ` Randy Brukardt
2008-04-30 4:36 ` Gautier
2008-04-30 7:15 ` Maciej Sobczak
2008-04-30 7:56 ` Dmitry A. Kazakov
2008-04-30 9:21 ` Georg Bauhaus
2008-04-30 15:16 ` Adam Beneschan
2008-04-30 15:20 ` Adam Beneschan [this message]
2008-04-30 21:32 ` Maciej Sobczak
2008-04-30 21:58 ` Adam Beneschan
2008-05-01 1:10 ` Adam Beneschan
2008-04-30 23:40 ` Randy Brukardt
2008-04-30 14:32 ` Sébastien
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox