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: Sun, 11 Feb 2018 11:47:58 +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: Sun, 11 Feb 2018 10:47:58 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="619f14c4571e3eea1ff72ea9a2809160"; logging-data="13152"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RsKgkamHIW+dmAbxc9gSvTOU+tCIdyeg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:5/PEqv0V5rm4Ntvwr5B6D6OU9mM= Xref: reader02.eternal-september.org comp.lang.ada:50377 Date: 2018-02-11T11:47:58+01:00 List-Id: On 02/10/2018 10:16 PM, Robert A Duff wrote: > > Vectors allow syntactic sugar like "A(X) := A(X) + 1;", > and this syntactic sugar relies on access discriminants, > which are of anonymous access types. Do you avoid using > that syntactic sugar? I don't use Ada 12 because it's only supported by one compiler, so I don't use these forms. But that doesn't answer your question, either. There are no anonymous access types in your examples of using these forms because using them doesn't require writing any. So if I used Ada 12 I wouldn't have any real problem with using such forms for constructs that already provide them. However, since I won't write any anonymous access types, I would not provide the ability to use such forms with anything I wrote. As it might be confusing to use these forms with some constructs and not with others, my code would probably be easier to read if I eschewed such forms. -- Jeff Carter "When Bell Labs were invited to evaluate C against the DoD requirements [for Ada], they said that there was no chance of C meeting the requirements of readability, safety, etc. for which we were striving, and that it should not even be on the list of evaluated languages." William Whitaker 116