comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Re-exporting features from private packages...
Date: 1997/02/16
Date: 1997-02-16T00:00:00+00:00	[thread overview]
Message-ID: <E5pKMM.Iw8.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: 5dp10k$19h$1@goanna.cs.rmit.edu.au


Dale Stanbrough (dale@goanna.cs.rmit.EDU.AU) wrote:

: Ada prevents a public package withing a private package presumably to
: prevent the private info being exported. However this rule seems too
: restrictive.

: A simple rule change would seem to allow a much more flexible use of
: private packages that would not compromise security. If a package
: spec was allowed to 'with' a private package, but only refer to it in
: its private section, it would seem we could have the best of both worlds.

: This could be signalled by a special syntax...

: 	with private Blah; use Blah;


: or simply by allowing it, with no change in syntax.

: Are there any reasons why this would not be a good thing?

Private child units might have better been called "body" child units.
They are logically extensions of the body, and are only visible to
other private units, and to bodies.  This ensures that you can
add, remove, or alter private child units without ever requiring
recompilation outside the subsystem (presuming no generic/inlined bodies
depend on them).

One could have defined them otherwise.  However, you can in fact already
accomplish what you want by defining a public child unit with 
everything in its private part.  It can then be mentioned in "with" 
clauses, but its (private) declarations are only visible inside the 
private part of other public child units.

: Dale

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




  reply	other threads:[~1997-02-16  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-11  0:00 Re-exporting features from private packages Dale Stanbrough
1997-02-16  0:00 ` Tucker Taft [this message]
1997-02-20  0:00 ` Samuel Mize
replies disabled

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