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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.37.71 with SMTP id x7mr1431858icd.4.1406134082568; Wed, 23 Jul 2014 09:48:02 -0700 (PDT) X-Received: by 10.182.131.166 with SMTP id on6mr23338obb.24.1406134082476; Wed, 23 Jul 2014 09:48:02 -0700 (PDT) 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.glorb.com!h18no6199244igc.0!news-out.google.com!eg1ni2igc.0!nntp.google.com!h18no6199243igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 23 Jul 2014 09:48:01 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6c2e0d54-9709-459e-bf84-94a36e06c795@googlegroups.com> Subject: Re: Parent/child dependencies and internal library units From: Adam Beneschan Injection-Date: Wed, 23 Jul 2014 16:48:02 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:21160 Date: 2014-07-23T09:48:01-07:00 List-Id: On Wednesday, July 23, 2014 9:20:27 AM UTC-7, Victor Porton wrote: > I noticed that child units depend on their parents.=20 >=20 > As such making parent dependent on a child makes a dependency loop. >=20 > Before noting this feature of Ada language, I thought parent units could = be=20 > implemented based on their child units, but that does not work, because= =20 > making parents dependent on children is a circular dependency. When you talk about parent units being "implemented" based on their child u= nits, are you talking about the *body* of a parent unit (which is where "im= plementation" normally lives)? There's no problem with making the body of = a parent unit depend on a child unit. A child unit depends on its parent's= *specification* but not on its body, so having the body of the parent depe= nd on the child does not create a loop. It might help to give a short example of what you want to write (even if it= 's not legal Ada because of a circular dependency). As it is, I'm not clea= r on what you're trying to do. -- Adam