Date:
Thu, 26 Nov 1998 12:44:00 +0100
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset=us-ascii
Organization:
ELCA Matrix SA
|
"Robert I. Eachus" wrote:
> Note that the "is <>;" default on formal generic subprograms is the one
> instance of run-time polymorphism in Ada 83, although I would never
> recommend using it just to obtain that effect. The run-time elaboration of
> "is <>" is more of a pain for compiler vendors than anything else:
> Generics are instantiated at run-time, and "is <>" matches the matching
> subprogram statically enclosing the point of instantiation. (See RM
> 12.6(15).) It is always possible to figure out the (static) parameter and
> result profile to be matched for every textual generic instantiation at
> compile time, and which delaration will correspond to it. But it can be
> the case that the actual subprogram created by that text to be called
> cannot be determined until run-time. In particular, the default parameter
> values may not be known until the instantiation is elaborated.
Could you please give an example of that (determination of the generic
actual subprogram cannot be done at compile time) ?
|
|
|