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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? Date: Sat, 01 Jan 2005 15:06:58 +0100 Organization: None Message-ID: <1414804.vssHtcLgsE@linux1.krischik.com> References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1104592587 02 14763 z1Hbrha1M70ht9c 050101 15:16:27 X-Complaints-To: usenet-abuse@t-online.de X-ID: r2oDEGZSoe4CkVAPI1h0+bxEgvz33fIkkli2GlM-MZVYv-5vDe9J0+ User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:7370 Date: 2005-01-01T15:06:58+01:00 List-Id: danmcleran@hotmail.com wrote: > 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. The C++ private is not realy hidden. The private keyword is only a marketing gag. Think about: #define private public #include "..." #undef private Truly hidden data need to be part of the package body or in C++ be declared only in the ".cpp" file. Ada is just more honest about it. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com