comp.lang.ada
 help / color / mirror / Atom feed
From: dgibson@thalamus.cis.ohio-state.edu (david scott gibson)
Subject: Re: Extending A Generic Signature Package
Date: 1997/03/21
Date: 1997-03-21T00:00:00+00:00	[thread overview]
Message-ID: <5guuehINN6iq@thalamus.cis.ohio-state.edu> (raw)
In-Reply-To: JSA.97Mar21135016@alexandria


In article <JSA.97Mar21135016@alexandria>,
Jon S Anthony <jsa@alexandria> wrote:

>Just to be clear, "pointers" are only indirectly relevant to
>dispatching.  The key is passing a class wide type argument(s) to a
>controlling operand(s) of a primitive operation.  For example, there
>is no need of a pointer in your above example:
>
>    declare
>       X : Base'Class := Get_Object;
>    begin
>       Op1(X);
>    end;

So in this case it's clear to us and the compiler what specific type
derived from Base Get_Object returns.  It may or may not be an access
type.  If an access type, Op1 could have an access parameter formal
and still dispatch.  However, Get_Object must return a tagged type and
thus the value returned must be returned by reference in either case,
right?  So whether explicit or not X, the value of X must be a pointer
to some object.  Is that right?  If Get_Object doesn't return an acces
type and we don't use Unchecked_Access or aliased variables anywhere
in the program, does Ada guarantee that the object to which X points
cannot be aliased?

Dave
--
dgibson@cis.ohio-state.edu





  reply	other threads:[~1997-03-21  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-17  0:00 Extending A Generic Signature Package david scott gibson
1997-03-18  0:00 ` Tucker Taft
1997-03-18  0:00   ` Alexander V. Konstantinou
1997-03-21  0:00     ` Geert Bosch
1997-03-21  0:00       ` Brian Rogoff
1997-03-22  0:00         ` Robert A Duff
1997-03-21  0:00 ` Jon S Anthony
1997-03-21  0:00   ` david scott gibson [this message]
1997-03-22  0:00     ` Robert A Duff
1997-03-22  0:00 ` Jon S Anthony
1997-03-21  0:00   ` david scott gibson
1997-03-22  0:00     ` Robert A Duff
1997-03-25  0:00 ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox