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!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? Date: 09 Jan 2005 12:38:40 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <1105290947.422412.195950@c13g2000cwb.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 1105292320 18860 69.38.147.31 (9 Jan 2005 17:38:40 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 9 Jan 2005 17:38:40 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:7583 Date: 2005-01-09T12:38:40-05:00 List-Id: danmcleran@hotmail.com writes: > That's exactly right. I would propose adding a new keyword, > 'concealed', to allow a package writer to hide certain areas from all > child packages. OK, but you haven't explained why you prefer that to the idea I proposed: allow the person who writes a package to specify the names of all children. That seems pretty simple. And if you have that complete list, you can track down all the relevant code and control it. You can't add new "evil" children later (without modifying the parent). There's not really much point in a child package that *can't* see the parent's private part. Such a child could just as well be declared at the same level as the parent. So if you want some 'concealed' stuff, the simplest thing would be to declare that this package has no children. Your 'concealed' idea could work, but it seems to add a lot of complexity (to a language that already has too-complex visibility rules). (Of course, as Jeff Carter pointed out, none of these changes are likely to make it into a future version of Ada. Certainly not Ada 2005 -- the new feature set is pretty much cast in stone at this point.) Does it bother you that subunits can access stuff in the parent *body*? - Bob