comp.lang.ada
 help / color / mirror / Atom feed
From: dale@cs.rmit.edu.au (Dale Stanbrough)
Subject: Re: Can't hide parts of ADTs in private children
Date: 1998/11/10
Date: 1998-11-09T22:16:56+00:00	[thread overview]
Message-ID: <dale-1011980916550001@dale.ppp.cs.rmit.edu.au> (raw)
In-Reply-To: 364683EB.41C6@syd.csa.com.au

David Bowerman wrote:

"But I can't do this because these types are referred to in the private
 part of the parent package spec, and this isn't allowed to 'with' its
 children."


Sorry, no solution, but an agreement that this is a problem.

Private normally means that the abstraction lives in the package
spec, and if changed clients have to recompile.

The rules for private packages mean that you can't with a private
package in a public spec, _even if it doesn't publically export
anything from the private package_.

E.g.

   package F is
   end F;

   private package F.Priv is
      type Handy is ...;
   end;

   
   with F.Priv;
   package F.Pub is
      type Public_Handy is private;

   private
      type Public_Handy is new F.Priv.Handy;

   end;


This unfortunately is not allowed because private now has another
meaning of...

   "you don't have to recompile external clients if a private package
    spec is changed"

I would rather have the normal rule of "package spec change means
recompilation of clients", than the existing rule which restricts the
composability of types.

Dale




  parent reply	other threads:[~1998-11-10  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-09  0:00 Can't hide parts of ADTs in private children David Bowerman
1998-11-09  0:00 ` Stephen Leake
1998-11-10  0:00 ` Dale Stanbrough [this message]
1998-11-16  0:00 ` Matthew Heaney
replies disabled

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