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!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? Date: Fri, 7 Jan 2005 17:26:00 +0000 Message-ID: References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <1104544963.930877.75170@c13g2000cwb.googlegroups.com> <1104595073.731663.180100@c13g2000cwb.googlegroups.com> Content-Type: text/plain; charset=us-ascii X-Trace: individual.net L71UsmnN0JCC+u0oOPYXNAaV05Thwcgy0HyIWxB2io9+dN6TE= X-Orig-Path: not-for-mail User-Agent: Gemini/1.45d (Qt/3.3.2) (Windows-XP) Xref: g2news1.google.com comp.lang.ada:7539 Date: 2005-01-07T17:26:00+00:00 List-Id: "Randy Brukardt" wrote: > The purpose of a child package is to extend its parent, often in ways not > forseen by the parent's author. You're trying to prevent that purpose. If > you don't want access to the private information, then don't write > children. You have to at some point trust programmers to do something > sensible; it's not the least bit hard to use 'Address or > Unchecked_Conversion to access the private information of a package, no > matter where you hide it. I think you're missing the point a little, Randy. Suppose there are some things in the private part of a package that you do want private children of the package to be able to see (and modify), and some other things in the private part that you do not want even private children to be able to see (or modify). In this case, it would seem it may be useful to have language construct that allows this intention to be clearly stated, and enforced by the compiler. If the intention later turns out to be an obstacle, the construct can be changed or removed. But if the intention is /accidentally/ violated, it could be very useful for the compiler to detect it and flag it up. I suppose the problem is, such a construct would imply the need for a new kind of private child -- perhaps a 'private private' child ;-) -- which could access the secret stuff. And then one might have ultra-secret stuff, and then ultra-secret children, and so on. So possibly the argument against is that it would be overkill. -- Best wishes, Nick Roberts