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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: package organization (is this doable?) Date: Fri, 29 Jun 2018 17:34:59 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="74d0eacff1120e85df1edb6f3f06b6d4"; logging-data="3364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/qSLE1ZpPgXQS9y0tdJZh7V+rRBzezacM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:Byv9ycQM3re2rM9g5RwycjqiesM= sha1:PGCGn6O1EqF6Q8eaiZxV8cOHXEY= Xref: reader02.eternal-september.org comp.lang.ada:53433 Date: 2018-06-29T17:34:59+01:00 List-Id: "Alejandro R. Mosteo" writes: > package Lib; -- Root package > > package Lib.Feat_1; -- Some feature > > package Lib.Feat_2; -- Another feature > > private package Lib.Impl; -- Things I want to keep secret, > conceptually they're in the private part of Lib IIUC. > > Am I right that it is impossible for Feat_1 and Feat_2 to communicate > using something that's private in Lib or Lib.Impl? That would mean > exposing those private types in their respective public parts, which > is a no go. Lib.Feat_1 & 2 can see the private part of Lib, and the public part of Lib.Impl. What's wrong with putting stuff in the public part of Lib.Impl? No one outside Lib can see it.