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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.2uCIJahv+a4XEBqttj5Vkw.user.gioia.aioe.org!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Visibility issue Date: Thu, 17 Sep 2020 17:00:35 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <27269975-58eb-407b-98ca-344bee6894d2n@googlegroups.com> <28481dfd-7127-4106-bcfd-f085ffbf228fn@googlegroups.com> <574318ce-0624-4893-8718-37f2e97736b7n@googlegroups.com> NNTP-Posting-Host: 2uCIJahv+a4XEBqttj5Vkw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader02.eternal-september.org comp.lang.ada:60179 List-Id: On 17/09/2020 15:31, Daniel wrote: > El miércoles, 16 de septiembre de 2020 a las 23:48:34 UTC+2, Simon Wright escribió: >> I still don't understand _why_. > ¿Why a tagged type in a callback function to send data to users? > It wasn't my decision. It's an imposed requirement. > (...yes sometimes I don't understand some requirements/limitations neither.) > >> Purely from the visibility aspect, >> >> package API is >> function F return Integer; >> private >> Secret : constant := 42; >> end API; >> >> private package API.Impl is >> Altered : constant := Secret / 2; >> end API.Impl; >> >> with API.Impl; >> package body API is >> function F return Integer is (Impl.Altered); >> end API; > > ok Lets try to fit this requirement: >> "There will be one or more internal packages not visible to users where information is created. Preferably not in API hierarchy" 1. API.Impl is not in the public hierarchy of API. 2. Alternatively rename API.Impl into API_Impl. Move all secrets from API to API_Impl. Use API_Impl with the body of API. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de