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, LOTS_OF_MONEY 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: "James A. Squire" Subject: Re: Subprogram Renaming Date: 1996/04/10 Message-ID: <316BCD9B.E9@csehp3.mdc.com>#1/1 X-Deja-AN: 146777002 sender: Ada programming language references: comments: Gated by NETNEWS@AUVM.AMERICAN.EDU content-type: text/plain; charset=us-ascii organization: MDA Avionics Tools & Processes mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01 (X11; I; HP-UX A.09.01 9000/715) Date: 1996-04-10T00:00:00+00:00 List-Id: On Mon, 8 Apr 1996 22:12:23, Robert Dewar wrote: > James Squire said > > "And my question was, why does being able to rename a subprogram AS A > BODY matter? What is so NEW about this? Why should I care about this > NEW thing?" > > Well any new feature may or may not be useful to you, but please study > my example more carefully, you CANNOT do whyat I suggested in Ada 83. I _knew that_ from the beginning. _That_ was _never_ my question. > The new feature is, as shown in my example, the ability to provide a > completion using a renaming, instead of a normal body. This saves having > to write a junk wrapper routine with an extra call. I _knew_ what the new feature _was_ all along. > It is most useful when used in the private part of a spec. How come you never mentioned the word "private" in your example? That would have at least meant something to me. ------------------------------ On Tue, 9 Apr 1996 20:52:04, Robert Dewar wrote: > James Squire said: > > "Still (!) Nobody has answered the $64,000.00 question: WHY IS THIS SUCH > A GOOD THING? In other words, why did they waste their time adding this > ability to rename a subprogram body. Why should I do:" > > > > If you think this then please answer the following question: > > why do we provide subprogram renaming at all? It is after all redundant, > you could always provide a junk body? Don't get me started. I _only_ use renames to avoid using the "use" clause, and then _only_ for operators. As far as I am concerned, it is a flaw in the Ada83 language that operators are not, in this instance, treated (as they are in every other language I am aware of) as part of the language itself - i.e., why should I ever have to do _anything_ to make implicit operators (declared by the compiler, not me) visible? However, I think I understand some of the benefits of this flaw, and as this constitutes topic drift, I'll just say that I trust they made the right decision. > There is no question that this is a useful new capability, especially, > as I noted before, when the renaming as body is not in the package body, > but instead in the private part of the package spec. I can see it being useful when the subprogram being renamed as a body is itself in the private part of another package, but what's the difference between putting the renaming statement in the private part of the spec and putting it in the body? > This is obviously better than putting a renaming in the visible part of > the spec, as Gary quite clearly explained. Gary who? I don't remember anyone named Gary responding to my question. It is possible that I never received it since I am reading this newsgroup through the INFO-ADA mailing list. -- James Squire MDA Avionics Tools & Processes ja_squire@csehp3.mdc.com "one of these days I'm going to better myself by going to Knight school" "You'll be a web knight instead of a web page!"