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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81bb2ce65a3240c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.223.40 with SMTP id qr8mr933907pbc.0.1335661443004; Sat, 28 Apr 2012 18:04:03 -0700 (PDT) Path: r9ni110173pbh.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: BrianG Newsgroups: comp.lang.ada Subject: Re: What would you like in Ada202X? Date: Sat, 28 Apr 2012 21:03:59 -0400 Organization: A noiseless patient Spider Message-ID: References: <3637793.35.1335340026327.JavaMail.geo-discussion-forums@ynfi5> Mime-Version: 1.0 Injection-Date: Sun, 29 Apr 2012 01:04:02 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="5MNoRlpIAhOS/jy0qxZerw"; logging-data="25341"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SMnsIBlw4xfBSkVelX3re" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Cancel-Lock: sha1:+VK1jykKdpf3FxdD/WD2DkK6IOM= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: 2012-04-28T21:03:59-04:00 List-Id: On 04/28/2012 09:21 AM, Yannick Duchêne (Hibou57) wrote: > Le Wed, 25 Apr 2012 10:01:48 +0200, Yannick Duchêne (Hibou57) > a écrit: ... > Le Tue, 17 Apr 2012 05:43:49 +0200, Randy Brukardt > a écrit: > >> "Georg Bauhaus" wrote in message >> news:4f8c93a0$0$6638$9b4e6d93@newsspool2.arcor-online.net... ... >> This is irrelevant, because Ada requires the names of the parameters >> to be >> those used in *calls*. The names used in the body probably ought to be >> nouns, but in calls, verbs or adjectives often work better: >> >> Leave (When => Now); >> >> It is a smallish fault of Ada, in fact, because there almost never are >> names >> that work well both in calls and in the body. > > Ability to give parameters, different names, one for body and one for > invokation place. > > Actually, one can fake it choosing a name well suited for call‑places > (where nothing can be done) and to use renaming of parameters in the > body (this, is something that can be done). That said, this is far to be > a priority, as we have renaming. > This is a problem that I would hate to see "fixed". It would cause headaches for maintenance. Imagine I have a large body of code that I have to maintain. In researching a problem, I find something like This_Is_A_Procedure (Its_Parameter => Some_Value); My problem relates to Some_Value, so I have to trace Its_Parameter. I search for it, but it only occurs in this line and in the spec of This_Is_A_Procedure; the body, I guess, uses a different name in this "fix". So I have to go from the call, to the spec parameter, to the body parameter, to the usages; I have to do this for every call, in every chain, every time. That makes maintenance a pain. With the "fake", there is a single line that associates the 'external' and 'internal' names. I still have to do two searches, but I can't choose the way the code was written. BTW, you can use a renames, or you can assign to a local variable, or to a local constant if the parameter is not going to be modified. -- --- BrianG 000 @[Google's email domain] .com