comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: How to pass around access types to interfaces?
Date: Wed, 29 Oct 2008 14:17:00 +0100
Date: 2008-10-29T14:17:01+01:00	[thread overview]
Message-ID: <1w8jzjuczrg47.1wzrhfewyzlq2.dlg@40tude.net> (raw)
In-Reply-To: 547a5372-f337-4cc4-a05e-953f8a5a70e0@v28g2000hsv.googlegroups.com

On Wed, 29 Oct 2008 05:42:38 -0700 (PDT), Sven wrote:

> "Access all" will allow me to pass references to aliased objects.
> Right now there is no reason to disallow that, so I'll keep the "all".

It is unrelated to being aliased. Limited tagged objects are aliased
anyway. (It usually makes no sense to reference non-limited ones).

"Access all" means that the pointer can point anywhere. Plain "access"
means that it can point only to the storage pool of the access type. The
memory pool can be specified explicitly using "for P'Storage_Pool use ..."

--------------
Rant:

My rule of thumb is that an explicitly declared access type is always
pool-specific in absence of further requirements. This is especially
important when the type is a formal generic parameter. Furthermore, in Ada
2005, which has by-structure matched anonymous access types, I see no
obvious reason to declare general access types ("access all") at all. It
seems to me that in all cases where general access comes in question, the
access type can be anonymous.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



      reply	other threads:[~2008-10-29 13:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 11:45 How to pass around access types to interfaces? Sven
2008-10-24 12:24 ` Niklas Holsti
2008-10-24 12:49   ` Sven
2008-10-24 13:55     ` Ludovic Brenta
2008-10-24 21:32 ` sjw
2008-10-25  8:54   ` Sven
2008-10-25 15:43 ` Martin Krischik
2008-10-25 22:15   ` Robert A Duff
2008-10-26  8:02     ` Dmitry A. Kazakov
2008-10-26 15:50     ` Martin Krischik
2008-10-28 13:41       ` Maciej Sobczak
2008-10-29 14:15         ` Martin Krischik
2008-10-31 13:38           ` Maciej Sobczak
2008-10-31 14:46             ` Dmitry A. Kazakov
2008-10-29 12:42   ` Sven
2008-10-29 13:17     ` Dmitry A. Kazakov [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