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,93d7def3eeefbc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 30 Dec 2004 12:51:05 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Private area and child packages References: <1104333056.340127.5170@f14g2000cwb.googlegroups.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Thu, 30 Dec 2004 12:51:05 -0600 NNTP-Posting-Host: 67.161.24.234 X-Trace: sv3-LI44UbVbeRxlylHeB6324/RR2k8gqV9sKAH8DmCuYhstLMVBYGCdFVhQrd7LcCEj4DcVfxcmSvKdV51!lh8ZVolbdT6rwtk2z4abAex5gHnlgnVZL8JdBT8H9WwOxtGSMfCPyFqToGht7w== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.22 Xref: g2news1.google.com comp.lang.ada:7335 Date: 2004-12-30T12:51:05-06:00 List-Id: >What I was wondering was how someone writing Some_Package can enforce >this on future package writers. I could obviously follow your >suggestion if I am the only developer writing code for a project. But, >if I want to hide implementation details from someone else who might >write a child package, I would need some mechanism to enforce this >information hiding. You could burn the only copy of the source code. Seriously, how else could you enforce such a restriction on future developers who want to fiddle with/fix your code? Even if the compiler would allow such a limit (say by disallowing child packages) what would prevent someone from simply modifying your code, say by moving the "hidden" declaration from the private to the public part of the spec? Or, if they can't modify your code, but can find a copy of the source somewhere, they could declare their own structure to match yours, and use an address clause to overlay their (visible) structure over yours. Part of the Ada Style is a certain humility. Assuming that your code and your design is so perfect that any change by anyone in the future is bad, is unwise, as shown by much sad experience. IMHO