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,5dacec64c8c879fa X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.231.202 with SMTP id ti10mr1400978pbc.5.1328656223095; Tue, 07 Feb 2012 15:10:23 -0800 (PST) Path: lh20ni272091pbb.0!nntp.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Preventing Unchecked_Deallocation? Date: Tue, 07 Feb 2012 18:10:22 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <33a35da4-6c3e-4ab4-b58f-a9d73565d79a@t30g2000vbx.googlegroups.com> <4350713b-6ac3-4b22-b221-8da2bac52fea@t5g2000yqk.googlegroups.com> <26e4f2a4-edae-4e37-8697-f2390e636a21@z31g2000vbt.googlegroups.com> <07915db7-0e84-4eb5-af69-ee31e10b018f@db5g2000vbb.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1328656222 1482 192.74.137.71 (7 Feb 2012 23:10:22 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 7 Feb 2012 23:10:22 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:zjZyop4yWq6u4kkFZ8UL9beaR6Q= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 2012-02-07T18:10:22-05:00 List-Id: Alan Copeland writes: > On Feb 7, 4:30�pm, Robert A Duff wrote: >> I don't understand that last sentence. �You don't need pointers >> (access types) to call primitive operations. > > Sure, but from a practical standpoint, what other choice is there? > You can't save the actual object Z off into an element of both X and Y > (otherwise you would have two separate objects), so you have to save > an access value. That way primitive ops of X and Y can both call > primitive ops on the same Z. Unless I'm missing something... If you want X and Y to share the same Z, then yes, they have to point at it in some way. But I still don't see what that has to do with primitive ops. You also often need pointers when working with class-wide objects (you can't have a component type T'Class, directly). - Bob