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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b8b8a54001adc4d2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? Date: 07 Jan 2005 16:33:14 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: shell01-e.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1105133594 5061 69.38.147.31 (7 Jan 2005 21:33:14 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 7 Jan 2005 21:33:14 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:7551 Date: 2005-01-07T16:33:14-05:00 List-Id: danmcleran@hotmail.com writes: > I would like to know if anyone else thinks that the inability to hide > private information from child packages is a deficiency in Ada95. If so, I think it's a minor one. As Randy pointed out, if you don't want child packages to do something nasty, then don't create any child packages. The language solution, I think, is not to restrict visibility in the way you and others have suggested. Instead, what I would do if I were designing a new language would be: allow each package to declare one of (1) no children allowed, (2) a particular list of named children allowed, or (3) fully extensible -- any children allowed. Subunits achieve (1) and (2), because the parent has to name all the subunits. But subunits are a pain for various reasons (which is why Tucker invented child units). In any case, as some folks have pointed out, you should think of "adding a child of X" as very similar to "modifying the source code of X". If you don't want people to do that, you need some extra-lingual mechanism to restrict them. - Bob