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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: little precision about anonymous access types Date: Wed, 21 Mar 2018 17:46:06 -0500 Organization: JSA Research & Innovation Message-ID: References: <42387d28-c983-4e58-9522-815ccd1ad0fb@googlegroups.com> Injection-Date: Wed, 21 Mar 2018 22:46:08 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="29454"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:51118 Date: 2018-03-21T17:46:06-05:00 List-Id: "Mehdi Saada" <00120260a@gmail.com> wrote in message news:42387d28-c983-4e58-9522-815ccd1ad0fb@googlegroups.com... > It sounds interesting. Could you explain a bit more what effect you refer > to ? Some code to show it ? Or a link to it. > For the time being, the few things I know is that anonymous types are > useful and safe for : coextensions, and controlling access > parameters/results and the dispatching they allow. > So if you allude to dispatching, I might understand your point (a bit), > otherwise I don't. Yikes. Anonymous access type act differently than their named counterparts in the following cases (to name a few): (1) Hard to set the convention, pre/postconditions, other aspects (because there's no declaration); (2) Accessibility for anonymous access parameters (both objects and subprograms), discriminants, stand-alone objects; (3) Full context passed with anonymous access-to-subprogram parameters; (4) Dynamic accessibility causes a "tripping hazard" (Program_Error with some actual parameters) - access parameters, stand-alone objects. (5) Hidden null exclusion for controlling anonymous access parameters. Randy.