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 10.107.47.7 with SMTP id j7mr20221004ioo.31.1520556210826; Thu, 08 Mar 2018 16:43:30 -0800 (PST) X-Received: by 10.157.46.5 with SMTP id q5mr1443080otb.10.1520556210584; Thu, 08 Mar 2018 16:43:30 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!r195no123839itc.0!news-out.google.com!a2-v6ni212ite.0!nntp.google.com!e10-v6no123197itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 8 Mar 2018 16:43:30 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=173.71.218.250; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 173.71.218.250 References: <5294b37f-57b1-4b8c-bd84-5dff3a0e7eac@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <86b8ddee-fef0-426b-af90-c6f5ce9c9d93@googlegroups.com> Subject: Re: Ada Alternatives to Unrestricted_Access From: Jere Injection-Date: Fri, 09 Mar 2018 00:43:30 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:50902 Date: 2018-03-08T16:43:30-08:00 List-Id: On Thursday, March 8, 2018 at 3:27:02 AM UTC-5, Dmitry A. Kazakov wrote: > On 07/03/2018 23:29, Jere wrote: > > On Wednesday, March 7, 2018 at 3:38:13 PM UTC-5, Dmitry A. Kazakov wrote: > >> On 2018-03-07 21:11, Jere wrote: > > >>> Since the Container > >>> implementation is unknown in the generic, I wasn't able to get a version > >>> of the Rosen technique to work as an alternative (same constant vs > >>> variable access problem). > >> > >> I am not sure I understand the problem. Why don't you pass a function > >> Self along with the container type: > >> > >> generic > >> type Container is tagged whatever; > >> function Self (C : Container'Class) > >> return not null access Container'Class; > >> package Iterative_Mess is > > > > Because the package is already in use in other code, so > > changing the specification would be a very time consuming > > change. > > You can default Self when not used. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de So I tried playing with this, but I still ran into the same problem when trying to implement the Self function. Inside I needed to "un-const" the container, so I came back to this same problem.