From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,579fe8b368f918a7 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Re-exporting features from private packages... Date: 1997/02/16 Message-ID: #1/1 X-Deja-AN: 219201730 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <5dp10k$19h$1@goanna.cs.rmit.edu.au> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-02-16T00:00:00+00:00 List-Id: 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