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,26a21b9e317dc639 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.80.4 with SMTP id n4mr225080pax.7.1353373248142; Mon, 19 Nov 2012 17:00:48 -0800 (PST) Received: by 10.50.193.198 with SMTP id hq6mr3219214igc.10.1353373247957; Mon, 19 Nov 2012 17:00:47 -0800 (PST) Path: s9ni313pbb.0!nntp.google.com!kt20no151641pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 19 Nov 2012 17:00:47 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: <9b0bcb37-8ae3-440f-af4f-a796702e4250@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <114a6fcf-32c3-408f-961f-2e3bf3c5af04@googlegroups.com> Subject: Re: Access type to member procedure of instance (Object Oriented programming in Ada) From: Adam Beneschan Injection-Date: Tue, 20 Nov 2012 01:00:48 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-19T17:00:47-08:00 List-Id: On Monday, November 19, 2012 4:05:16 PM UTC-8, Randy Brukardt wrote: > "Randy Brukardt" wrote in message=20 > I should point out that I don't think that the code you wrote actually wo= uld=20 > solve the problem you were trying to solve. That's because you usually ne= ed=20 > to make dispatching calls, and such a call would be bound to a subprogram= =20 > when you wrote the name "Message.Print" and not when you actually made th= e=20 > call. If Message had type Message_Type'Class, I'd assume that at some point, Mess= age.Print'Access would need to determine which Print subprogram would be ca= lled, and figure out the address of it. I don't think it matters whether i= t's done when the 'Access value is computed or when the call is made, since= the tag of an object can't be changed during the object's lifetime. I cou= ld be wrong, though; maybe I've missed a case where it matters. (But I'm n= ot concerned about the possibility of an object's tag being changed through= extralegal means like Unchecked_Conversion.) -- Adam