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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:6b92:: with SMTP id v140mr11929135itc.161.1557576382002; Sat, 11 May 2019 05:06:22 -0700 (PDT) X-Received: by 2002:a05:6830:16d2:: with SMTP id l18mr2306342otr.303.1557576381887; Sat, 11 May 2019 05:06:21 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!136no338991itk.0!news-out.google.com!v82ni292ita.0!nntp.google.com!b2no338521itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 11 May 2019 05:06:21 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Anonymous Access and Accessibility Levels From: Jere Injection-Date: Sat, 11 May 2019 12:06:21 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 3118 X-Received-Body-CRC: 594167337 Xref: reader01.eternal-september.org comp.lang.ada:56295 Date: 2019-05-11T05:06:21-07:00 List-Id: On Friday, April 26, 2019 at 1:12:43 PM UTC-4, G.B. wrote: > On 24.04.19 12:42, Jere wrote: > > > I'm definitely aware of the HoD and its reputation. I am a bit > > discourage that there is not any resource (person or written) > > available to help newcomers (or heck even somewhat experienced > > Ada programmers) with issues like these. > > It might be too late when designs involving anonymous access > types become issues, but then any design can possibly > have fewer issues if the Ada Rationale is first consulted. > I'm concluding this in part observing designs of programmers who > have chosen to transport a pointer-based mind set to Ada. > This means, they are perhaps not aware of the Rationale. > > As an additional consequence, if GNAT advises to use pointer > types, programmers may not always be given the best advice > from a design point of view, only from a compiler that cannot > undo designs. I'm not sure the Rationale covers all of the use cases where access types end up being needed. I know working in a lot of non heap based designs (no heap on my chip), General access types occasionally have to be used as part of the innards of some complex type. Named access types are too restrictive and end up requiring the use of Unchecked_Access and in some other cases can lead to bad designs when used. That leaves anonymous access types, which seem incomplete. Ada needs safe access types that are more flexible than named access types. They don't have to be anonymous necessarily, but they are a gap in the language design, especially when you are dealing with limited types, which have no container support or similar, so the standard ways of avoiding access types don't apply.