comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Private Children
Date: 1999/06/21
Date: 1999-06-21T00:00:00+00:00	[thread overview]
Message-ID: <376E70A5.F77E558D@averstar.com> (raw)
In-Reply-To: 7klja3$c0p$1@nnrp1.deja.com

Ted Dennison wrote:
> 
> In article <m3bteacxb8.fsf@mheaney.ni.net>,
>   Matthew Heaney <matthew_heaney@acm.org> wrote:
> > Can a public child package with its private sibling?
> >
> 
> Almost exactly one month ago, I posted the exact same question.
> Go to deja.com and search for a thread titled "Children of private
> compilation units" to see the discussion.
> 
> As I remember, it went something like this: Gnat doesn't accept it, and
> Robert Dewar says its not legal Ada. ObjectAda and GreenHills do accept
> it, and Tucker Taft says it *is* legal Ada. I offered to send in a bug
> report to the appropriate vendor, if a consensus could be reached on
> which one was in error. Currenly there appears to be no such consensus.

No, this was a different issue.  It had to do with whether
a specless subprogram was considered a spec or a body.  Bodies
are allowed to "with" private siblings, specs are not.  In this
case, the ultimate consensus position, based on AARM readings,
is that a specless subprogram is treated like a "spec" for the
purposes of this rule, and may not "with" a private sibling.

To answer the question posed by this new question, the answer
given by Dale was correct, that private children provide "compilation
privacy."  If you want to allow something to be "with"ed by public
children's specs, but contain content that is only visible to
the private part of the child's spec, the following idiom works:

   package Mostly_Private is
   private
       ... -- Declarations visible only in private part of other public
       ...  -- siblings
   end Mostly_Private;

That is, put the entire set of declarations in the private part
of a public child.


> T.E.D.

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions  (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA




  reply	other threads:[~1999-06-21  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-20  0:00 Private Children Matthew Heaney
1999-06-21  0:00 ` Ted Dennison
1999-06-21  0:00   ` Tucker Taft [this message]
1999-06-21  0:00     ` Matthew Heaney
1999-06-21  0:00       ` Tucker Taft
1999-06-22  0:00         ` Richard D Riehle
1999-06-22  0:00           ` Dale Stanbrough
1999-06-22  0:00             ` Matthew Heaney
1999-06-23  0:00               ` Dale Stanbrough
1999-06-23  0:00                 ` Matthew Heaney
1999-06-23  0:00                   ` Dale Stanbrough
1999-06-23  0:00                     ` Richard D Riehle
1999-06-23  0:00                       ` Vladimir Olensky
1999-06-23  0:00                         ` Richard D Riehle
1999-06-24  0:00                           ` Hyman Rosen
1999-06-24  0:00                             ` Richard D Riehle
1999-06-23  0:00                       ` John Duncan
1999-06-24  0:00                       ` Dale Stanbrough
1999-06-22  0:00             ` Richard D Riehle
1999-06-21  0:00     ` Matthew Heaney
1999-06-25  0:00   ` Robert Dewar
1999-06-21  0:00 ` Dale Stanbrough
replies disabled

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