comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Child packages question
Date: Tue, 09 Apr 2002 08:28:32 GMT
Date: 2002-04-09T08:28:32+00:00	[thread overview]
Message-ID: <QCxs8.1713$UJ7.829234396@newssvr14.news.prodigy.com> (raw)
In-Reply-To: ub4pmlmg24n583@corp.supernews.com

>We put all of the bindings in Claw into private packages
>(Claw.Low_Level.Windows, Claw.Low_Level.GDI, etc.). Only Claw can with
>those packages; users of Claw can't access them.
  But parent's normally don't call children.  In the Claw case, Claw.child
may call claw.low_level.xxx but that's calling a cousin.  I'd say the use
of child packages for private packages is a less common technique.  More
commonly a child package extends somehow its parent.  For instance,
claw.sockets has a bunch of stuff, but claw.sockets.non-blocking has
extensions for those times you want your sockets to be non-blocking.  It
can't be claw.sockets_non_blocking, "with"ing claw.sockets, because it
needs access to some things that the parent claw.sockets does not make
public.
  So usually children see parents, in more detail than the general public,
but parents don't see children.  The phraseology of parent/child/private
parts etc just doesn't work nicely, at least if you are thinking of
humans.  Perhaps there's a nicer animal model.
  If you want Car to see Car.Engine, you probably want Car.Engine to be
a package *inside* of Car, not a child of Car.  Then the two packages
can see (selectively) parts of each other.



  reply	other threads:[~2002-04-09  8:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-09  1:33 Child packages question James Ross
2002-04-09  2:17 ` sk
2002-04-09  4:39   ` James Ross
2002-04-09  4:40     ` sk
2002-04-09  6:37     ` Ingo Marks
2002-04-09  3:17 ` Pat Rogers
2002-04-09  3:58 ` Randy Brukardt
2002-04-09  8:28   ` tmoran [this message]
2002-04-09 15:11     ` Ted Dennison
2002-04-10 23:02       ` Randy Brukardt
     [not found] <3CB24F38.2D03C71A@myob.com>
2002-04-09  2:54 ` Steven Deller
     [not found] <000101c1df71$eb7d9920$2137e5c0@rational.com>
2002-04-09  3:22 ` sk
replies disabled

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