comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Parent/child dependencies and internal library units
Date: Wed, 23 Jul 2014 09:48:01 -0700 (PDT)
Date: 2014-07-23T09:48:01-07:00	[thread overview]
Message-ID: <6c2e0d54-9709-459e-bf84-94a36e06c795@googlegroups.com> (raw)
In-Reply-To: <lqoncd$ue7$1@speranza.aioe.org>

On Wednesday, July 23, 2014 9:20:27 AM UTC-7, Victor Porton wrote:
> 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.

When you talk about parent units being "implemented" based on their child units, are you talking about the *body* of a parent unit (which is where "implementation" 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 depend 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 clear on what you're trying to do.

                                -- Adam

  parent reply	other threads:[~2014-07-23 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 16:20 Parent/child dependencies and internal library units Victor Porton
2014-07-23 16:40 ` mockturtle
2014-07-23 16:47 ` Simon Wright
2014-07-23 16:48 ` Adam Beneschan [this message]
2014-07-23 18:37 ` Stefan.Lucks
2014-07-23 21:31 ` Robert A Duff
replies disabled

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