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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4103f02f9e6c4df2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-14 20:20:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!skynet.be!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3A8B5891.363B6B44@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 0y wish list: "with private" References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 15 Feb 2001 04:18:30 GMT NNTP-Posting-Host: 158.252.123.139 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 982210710 158.252.123.139 (Wed, 14 Feb 2001 20:18:30 PST) NNTP-Posting-Date: Wed, 14 Feb 2001 20:18:30 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: supernews.google.com comp.lang.ada:5265 Date: 2001-02-15T04:18:30+00:00 List-Id: "Beard, Frank" wrote: > > What I have > long wished for is to be able to do the following: > > package A is > > type B is private; > > private > > type B; -- If the completion is not here, > -- then it's deferred to the body > > end A; > > package body A is > > type B is ...; > > end A; > > This would allow the separation of the spec and body without > the bother of using an access type, and the associated dangling > memory and garbage collection issues. Yes, or even package A is type B is private; -- operations on B end A; package body A is type B is ...; end A; I submitted this as a 9X revision request, but it was rejected on the grounds that one can achieve the same effect with an access type: package A is type B is private; -- operations on B private type X; type Y is access all X; type B is new Finalization.Controlled with record Z : Y; end record; -- procedures Initialize, Adjust, and Finalize end A; However, this is qualitatively different. I want to be able to use B as B, and not have to get into all the details of it actually being an access type. Let the compiler deal with all that. I suppose this would involve a certain amount of work for compiler developers for what such developers see as a small gain. -- Jeff Carter "Sons of a silly person." Monty Python & the Holy Grail