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!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Parent/child dependencies and internal library units Date: Wed, 23 Jul 2014 17:31:21 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls7.std.com 1406151050 4860 192.74.137.71 (23 Jul 2014 21:30:50 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 23 Jul 2014 21:30:50 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:00VTWx1JaKT0syCiFcPwgf3vmJ8= Xref: news.eternal-september.org comp.lang.ada:21163 Date: 2014-07-23T17:31:21-04:00 List-Id: Victor Porton writes: > I noticed that child units depend on their parents. > > As such making parent dependent on a child makes a dependency loop. > > Before noting this feature of Ada language, I thought parent units could be > implemented based on their child units, but that does not work, because > making parents dependent on children is a circular dependency. > > So, my question: > > What is a good way to create "internal" or "implementation" units for a > unit? Should I create a *.Internal.* hierarchy of packages? Cyclic dependences are allowed if you say "limited with". And as others have pointed out, a package body can "with" its children. - Bob