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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: grassroots thoughts on access types Date: Fri, 9 Feb 2018 18:01:38 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5d9134c9-a7d4-468e-8685-ebbb393eabea@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 9 Feb 2018 17:01:38 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="5bd1d71638dd3344bf1d3ceb28f19f8a"; logging-data="5619"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+r0dqcN9q1I/ENDfOUv2jMW+jqq4BZ3Bo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <5d9134c9-a7d4-468e-8685-ebbb393eabea@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:JjMSPqtMCo23sfXhia60zNu3YM4= Xref: reader02.eternal-september.org comp.lang.ada:50340 Date: 2018-02-09T18:01:38+01:00 List-Id: Others have responded to your questions. I'd like to mention my thoughts on using access-to-object types (which I'll call "access types") in general. (By "use", I'm referring to designing code with access types, not to using them when required to in order to reuse existing code. Gnoga, for example, requires you to supply some access values to use it.) It's very rare to actually need to use access types in Ada. Other than while learning the language, it's quite likely that you'll never encounter a situation in which you'll need them. So while it's important to learn how they work, you shouldn't be designing in terms of them. My personal rules for designing with access types: 1. Don't use access types 2. If you think you need access types, see rule 1. 3. If you still think you need access types, don't use visible or anonymous access types 4. If you think you need visible or anonymous access types, see rule 3. 5. If you still think you need visible or anonymous access types, then you shouldn't design software. -- Jeff Carter "Gentlemen, you can't fight in here. This is the War Room!" Dr. Strangelove 30