comp.lang.ada
 help / color / mirror / Atom feed
From: adam@irvine.com (Adam Beneschan)
Subject: Re: Subprogram Renaming
Date: 1996/04/11
Date: 1996-04-11T00:00:00+00:00	[thread overview]
Message-ID: <4kjkg6$4m2@krusty.irvine.com> (raw)
In-Reply-To: Dpo770.ByH@world.std.com

bobduff@world.std.com (Robert A Duff) writes:

>>I never said nor implied that I was expecting some AMAZING NEW
>>CAPABILITY.  I was, however, expecting something more than a shorthand.
>>Shorthands do not seem to me to be worthy of attention when upgrading a
>>language.  There should be something more to it than that.
>
>Sorry to disappoint you, but it really is just a short-hand.  In every
>case where a renaming-as-body is used, you could just as well write a
>plain old body.  The only advantage is that the renaming-as-body is 1
>line of code, whereas the plain old body is 4 lines of code -- the
>verbosity in this case damages readability.  Not a big deal.  The
>renaming as body *might* be more efficient, but that's questionable.  In
>GNAT, I believe that a renaming as body and the plain old body will
>generate identical code.

Just out of curiosity:

    package q is
       procedure j;
    end q;

    package body q is
       procedure k;
       procedure j renames k;
    end q;

Are j'address and k'address equal?  Is there anything in the RM that
says one way or the other whether they must be equal?

How about j'access and k'access?

I can't think of a legitimate reason to compare the two in actual
code, in either case.  I'm just curious if the RM says anything about
it, and if this would prevent the compiler from generating code for
"j" that calls "k".

                                -- Adam




  reply	other threads:[~1996-04-11  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 johndoe
1996-04-10  0:00 ` James A. Squire
1996-04-10  0:00   ` Robert A Duff
1996-04-11  0:00     ` Adam Beneschan [this message]
1996-04-11  0:00       ` Robert Dewar
1996-04-11  0:00       ` Robert A Duff
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
     [not found] <md5:3CC2294B6049DDBD8790280EABCEDE81>
1996-04-12  0:00 ` James A. Squire
     [not found] <md5:88A5E8822105A2023A0A951BB5EC646E>
1996-04-10  0:00 ` James A. Squire
     [not found] <md5:87494FB95037B9578F62831DE10B6BB3>
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