From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:620a:20db:: with SMTP id f27mr30135655qka.11.1600356744029; Thu, 17 Sep 2020 08:32:24 -0700 (PDT) X-Received: by 2002:a05:620a:cd7:: with SMTP id b23mr29203781qkj.192.1600356741156; Thu, 17 Sep 2020 08:32:21 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 17 Sep 2020 08:32:20 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=92.56.166.72; posting-account=C8J7NQoAAAD_ybGY7--QIRi6KpLjoH1Z NNTP-Posting-Host: 92.56.166.72 References: <27269975-58eb-407b-98ca-344bee6894d2n@googlegroups.com> <28481dfd-7127-4106-bcfd-f085ffbf228fn@googlegroups.com> <574318ce-0624-4893-8718-37f2e97736b7n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <72104242-209f-4821-912e-f2191764f80an@googlegroups.com> Subject: Re: Visibility issue From: Daniel Injection-Date: Thu, 17 Sep 2020 15:32:24 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3678 X-Received-Body-CRC: 2912297199 Xref: reader02.eternal-september.org comp.lang.ada:60182 List-Id: El jueves, 17 de septiembre de 2020 a las 17:00:38 UTC+2, Dmitry A. Kazakov= escribi=C3=B3: > On 17/09/2020 15:31, Daniel wrote:=20 > > El mi=C3=A9rcoles, 16 de septiembre de 2020 a las 23:48:34 UTC+2, Simon= Wright escribi=C3=B3:=20 > >> I still don't understand _why_.=20 > > =C2=BFWhy a tagged type in a callback function to send data to users?= =20 > > It wasn't my decision. It's an imposed requirement.=20 > > (...yes sometimes I don't understand some requirements/limitations neit= her.)=20 > >=20 > >> Purely from the visibility aspect,=20 > >>=20 > >> package API is=20 > >> function F return Integer;=20 > >> private=20 > >> Secret : constant :=3D 42;=20 > >> end API;=20 > >>=20 > >> private package API.Impl is=20 > >> Altered : constant :=3D Secret / 2;=20 > >> end API.Impl;=20 > >>=20 > >> with API.Impl;=20 > >> package body API is=20 > >> function F return Integer is (Impl.Altered);=20 > >> end API;=20 > >=20 > > ok Lets try to fit this requirement:=20 > >> "There will be one or more internal packages not visible to users wher= e information is created. Preferably not in API hierarchy" > 1. API.Impl is not in the public hierarchy of API.=20 Sadly requirement says to dont be neither public or private hierarchy part = of the API. > 2. Alternatively rename API.Impl into API_Impl. Move all secrets from=20 > API to API_Impl. Use API_Impl with the body of API. =C2=BFHow exactly achieve to use API_Imp with the body of API?.... maybe us= ing " .."separate" keyword an using nested child ? Something like this? ----api.ads package body API is package body API_Imp is separate; --api-api_Imp.ads separate (API) package body API_Imp is Secret: Natural:=3D 42;=20 Altered : Natural:=3D Secret / 2;=20 end=20 If is not like this example, =C2=BFHow is your proposal?=20 > Regards,=20 > Dmitry A. Kazakov=20 > http://www.dmitry-kazakov.de