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,FREEMAIL_FROM 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!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: danmcleran@hotmail.com Newsgroups: comp.lang.ada Subject: Possible Ada deficiency? Date: 31 Dec 2004 11:06:29 -0800 Organization: http://groups.google.com Message-ID: <1104516898.394380.91980@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 172.163.236.126 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1104519994 13066 127.0.0.1 (31 Dec 2004 19:06:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 31 Dec 2004 19:06:34 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=172.163.236.126; posting-account=LSix6gsAAACmBFWMCbh6syCaua0lawvj Xref: g2news1.google.com comp.lang.ada:7354 Date: 2004-12-31T11:06:29-08:00 List-Id: I would like to know if anyone else thinks that the inability to hide private information from child packages is a deficiency in Ada95. I am discussing ways to do this on another thread, (See Private area and child packages), but it seems wrong that one has to go through a bunch of machinations to do something like this. Wouldn't a language construct for this be advantageous? In C++ and Java, no private data can be seen by child classes. I think that Ada would benefit from extending its information hiding capabilities by allowing a package writer to conceal type information from child packages. What if Ada had a keyword, I've chosen 'concealed' for the sake of discussion, to indicate that the implementation of a type was not visible to the outside world (including child packages). Something like this: --This is not Ada! package Some_Package is type Not_So_Secret_Type is private; -- Child packages can see the details type Super_Secret_Type is concealed; -- Hidden from everyone private --child packages have full visibility concealed --not even child packages can see here end Some_Package;