From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,100eb0a59892e906 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: How to pass around access types to interfaces? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <547a5372-f337-4cc4-a05e-953f8a5a70e0@v28g2000hsv.googlegroups.com> Date: Wed, 29 Oct 2008 14:17:00 +0100 Message-ID: <1w8jzjuczrg47.1wzrhfewyzlq2.dlg@40tude.net> NNTP-Posting-Date: 29 Oct 2008 14:17:01 CET NNTP-Posting-Host: 1be97eda.newsspool1.arcor-online.net X-Trace: DXC=_U6bIDoBkgBM4NT:VdOg6M X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:2523 Date: 2008-10-29T14:17:01+01:00 List-Id: 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