From: Jonas Nygren <ehsjony@ehs.ericsson.se>
Subject: Re: Subprogram Renaming
Date: 1996/04/12
Date: 1996-04-12T00:00:00+00:00 [thread overview]
Message-ID: <316E1AFC.596D@ehs.ericsson.se> (raw)
In-Reply-To: dewar.829233953@schonberg
Robert Dewar wrote:
>
> Jonas asked:
>
> "But it could be put in the private part, without 'exposing the renaming'.
> Robert mentioned before that this had a performance drawback but I can't see
> that this would be the case if you have a generic package."
>
> No, the performance penalty of creating a body occurs only if the renaming
> is in the body. Actually, as Bob Duff pointed out, not all compilers
> will take advantage of the possible performance gain (equiavlent to
> automatic inlining) that completion-with-renaming can provide (GNAT does
> not, since it requires renaming capability at the linker level, a feature
> that not all linkers provide). However, this performance penalty can in
> any case be completely eliminated by use of pragma Inline so in the case
> where the renaming-as-body appears in the body it is a shorthand and
> nothing more.
>
> In the private part it is a different feature, but I don't understand
> Jonas' comment above. Sure in Ada 83 you could put a renaming in the
> private part, and it wouldn't expose the renaming -- it also would not
> expose ANYTHING and could not be used by a client of the package and
> therefore would be completely useless!
Well, I don't know anything about Ada 83 and just a little bit more
about Ada 95 :-)
>
> The ability to use renaming-as-body in the private part is a new Ada 95
> feature which is quite useful, sometimes it can completely eliminate a
> package body that would otherwise be required in Ada 83.
Sorry, I perhaps misunderstood youre earlier posting. I read this as you
were advocating that all renaming should be in the body and then I tried
to point out that there could be reasons for doing the renaming in the
private part of the spec. My motivation for this was perhaps not the best.
-------------------------------------------------------
-- Jonas Nygren
-- ehsjony@ehs.ericsson.se
-------------------------------------------------------
next prev parent reply other threads:[~1996-04-12 0:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <md5:95D854EBD1A47E0E86027A3CC7DBD9A4>
1996-04-10 0:00 ` Subprogram Renaming James A. Squire
1996-04-10 0:00 ` Robert Dewar
1996-04-11 0:00 ` Jonas Nygren
1996-04-11 0:00 ` Robert Dewar
1996-04-12 0:00 ` Jonas Nygren [this message]
1996-04-10 0:00 ` Robert A Duff
1996-04-11 0:00 ` Adam Beneschan
1996-04-11 0:00 ` Robert Dewar
1996-04-11 0:00 ` Robert A Duff
1996-04-10 0:00 ` johndoe
[not found] <md5:3CC2294B6049DDBD8790280EABCEDE81>
1996-04-12 0:00 ` James A. Squire
[not found] <md5:87494FB95037B9578F62831DE10B6BB3>
1996-04-10 0:00 ` James A. Squire
[not found] <md5:88A5E8822105A2023A0A951BB5EC646E>
1996-04-10 0:00 ` James A. Squire
[not found] <md5:FE4AB546A8392541EDC1E3FE12E3D8AF>
1996-04-09 0:00 ` James A. Squire
1996-04-09 0:00 ` Robert Dewar
1996-04-10 0:00 ` Robert A Duff
1996-04-11 0:00 ` Mark A Biggar
1996-04-10 0:00 ` johndoe
1996-04-10 0:00 ` Norman H. Cohen
1996-04-11 0:00 ` Norman H. Cohen
1996-04-12 0:00 ` Jonas Nygren
1996-04-12 0:00 ` Norman H. Cohen
1996-04-13 0:00 ` Robert A Duff
1996-04-15 0:00 ` Norman H. Cohen
[not found] <md5:046A59600C3FEFC327385C3E914D6997>
1996-04-08 0:00 ` James A. Squire
1996-04-08 0:00 ` Robert Dewar
1996-04-09 0:00 ` Gary McKee
1996-04-09 0:00 ` Robert A Duff
[not found] <md5:C24D8C2EE138D9627FB8B93E2E35D9F3>
1996-04-05 0:00 ` James A. Squire
1996-04-06 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox