comp.lang.ada
 help / color / mirror / Atom feed
From: Daniel <danielnorberto@gmail.com>
Subject: Re: Visibility issue
Date: Thu, 17 Sep 2020 08:32:20 -0700 (PDT)	[thread overview]
Message-ID: <72104242-209f-4821-912e-f2191764f80an@googlegroups.com> (raw)
In-Reply-To: <rjvtmg$14vv$1@gioia.aioe.org>

El jueves, 17 de septiembre de 2020 a las 17:00:38 UTC+2, Dmitry A. Kazakov escribió:
> 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. 
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 
> API to API_Impl. Use API_Impl with the body of API.
¿How exactly achieve to use API_Imp with the body of API?.... maybe using " .."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:= 42; 
Altered : Natural:= Secret / 2; 
end 
If is not like this example, ¿How is your proposal? 

> Regards, 
> Dmitry A. Kazakov 
> http://www.dmitry-kazakov.de

  reply	other threads:[~2020-09-17 15:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 10:37 Visibility issue Daniel
2020-09-11 11:51 ` Maxim Reznik
2020-09-11 20:11   ` Daniel
2020-09-11 14:23 ` Jeffrey R. Carter
2020-09-11 20:17   ` Daniel
2020-09-11 22:36     ` Jeffrey R. Carter
2020-09-14 10:47       ` Daniel
2020-09-14 16:10         ` Jeffrey R. Carter
2020-09-15 19:11           ` Daniel
2020-09-15 20:03             ` Jeffrey R. Carter
2020-09-11 21:05 ` Dmitry A. Kazakov
2020-09-14 11:33   ` Daniel
2020-09-14 14:42     ` Dmitry A. Kazakov
2020-09-15 19:35       ` Daniel
2020-09-16  7:14         ` Dmitry A. Kazakov
2020-09-16 10:23           ` Daniel
2020-09-16 10:58             ` Dmitry A. Kazakov
2020-09-16 14:35               ` Daniel
2020-09-16 14:49                 ` Jeffrey R. Carter
2020-09-16 15:05                 ` Dmitry A. Kazakov
2020-09-16 20:09                   ` Daniel
2020-09-16 21:48                     ` Simon Wright
2020-09-17 13:31                       ` Daniel
2020-09-17 15:00                         ` Dmitry A. Kazakov
2020-09-17 15:32                           ` Daniel [this message]
2020-09-17 16:47                             ` Dmitry A. Kazakov
2020-09-18  8:05                         ` Simon Wright
2020-09-14 16:18 ` Simon Wright
2020-09-17 15:58 ` Jere
2020-09-17 16:10 ` Jere
2020-09-18  8:08   ` Simon Wright
2020-09-17 21:47 ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox