Re: Access to function returning class-wide type
- From: "Randy Brukardt" <randy@xxxxxxxxxxxxxx>
- Date: Thu, 21 Aug 2008 23:53:10 -0500
"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote in message
news:tslrrr8w3j63.zp28ykzgmr23.dlg@xxxxxxxxxxxxx
....
P.S. I don't know reasons why it was decided to use an access type in
Ada.Tags.Generic_Dispatching_Constructor profile. One could always pass a
pointer there if a side effect on the parameters were desired. But that is
another issue, and in any case Proc is thought as an implementation
detail,
so its exact profile should not really matter.
I originally came up with this proposal (based on random thoughts tossed out
by Steve Baird and Tucker Taft). We'd been trying to find solutions for
literally years; I was amazed that this one didn't fall into a heap of slag
as the others had.
Anyway, the access parameter exists so that an instance of this routine
matches the profile of S'Class'Input. After all, the purpose of this routine
is to eliminate the Ada 95 compiler magic involved with S'Class'Input and
make it user-programmable. The thought is that a user-defined version of
S'Class'Input would be directly specified as an instance of
Generic_Dispatching_Constructor.
In hindsight, I'm not certain that is a good idea, because it mucks up the
spec for no particularly good reason. But that's the way it is now.
Randy.
.
- Follow-Ups:
- Re: Access to function returning class-wide type
- From: Randy Brukardt
- Re: Access to function returning class-wide type
- References:
- Access to function returning class-wide type
- From: Paweł 'Nivertius' Płazieński
- Re: Access to function returning class-wide type
- From: Paweł 'Nivertius' Płazieński
- Re: Access to function returning class-wide type
- From: Dmitry A. Kazakov
- Access to function returning class-wide type
- Prev by Date: Re: Array slices and types
- Next by Date: Re: Access to function returning class-wide type
- Previous by thread: Re: Access to function returning class-wide type
- Next by thread: Re: Access to function returning class-wide type
- Index(es):
Relevant Pages
|