From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac5c3bc59168d76 X-Google-Attributes: gid103376,public From: adam@irvine.com (Adam Beneschan) Subject: Re: Subprogram Renaming Date: 1996/04/11 Message-ID: <4kjkg6$4m2@krusty.irvine.com>#1/1 X-Deja-AN: 146964905 references: <316BC3D6.14E7@csehp3.mdc.com> organization: /z/news/newsctl/organization newsgroups: comp.lang.ada Date: 1996-04-11T00:00:00+00:00 List-Id: 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