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!news.glorb.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny01.POSTED!c2bfcbcf!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <1104594390.142290.12210@z14g2000cwz.googlegroups.com> <1104608595.353412.230130@c13g2000cwb.googlegroups.com> <1104636997.704918.94250@c13g2000cwb.googlegroups.com> Message-ID: From: "Ed Falis" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit User-Agent: Opera M2/7.60 (Linux, build 874) Date: Sun, 02 Jan 2005 15:53:12 GMT NNTP-Posting-Host: 141.154.123.21 X-Complaints-To: abuse@verizon.net X-Trace: trndny01 1104681192 141.154.123.21 (Sun, 02 Jan 2005 10:53:12 EST) NNTP-Posting-Date: Sun, 02 Jan 2005 10:53:12 EST Xref: g2news1.google.com comp.lang.ada:7392 Date: 2005-01-02T15:53:12+00:00 List-Id: On 1 Jan 2005 19:36:37 -0800, wrote: > Because by using access values, one would have to manage the memory > associated with the object. Also, a dangling reference could be left > behind. See Jeff Carter's post: > > http://groups-beta.google.com/group/comp.lang.ada/browse_frm/thread/93d7def3eeefbc26/e8e7d2d6f3847f5c#e8e7d2d6f3847f5c > > IMO, a proper construct to allow hiding of implementation detail from > child packages is superior to this suggestion. > IMO, the kind of type opacity you're looking for here is rarely enough used that an additional language feature is unjustified. As others have pointed out, child units are most often used to provide enhancements or additional facilities to a basic abstraction. Sometimes/often this needs access to the underlying representation. If you read the introductory section on hierarchical libraries in the Ada 95 Rationale, (II.7), I think you'll find that one of the main motivations (if not the main motivation) for the concept is to facilitate the sharing of private type representations among related abstractions. In that context, the kind of type opacity you want is a corner case, addressable by other facilities of the language in a "building block" manner - the usual Ada way of addressing non-language-defined capabilities. This may sound conservative, and it is - there is always a cost related to adding new features to the language. In this particular case, we have to agree to disagree about the relative value of the proposed construct. - Ed