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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c733905936c6b6b0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.233.170 with SMTP id tx10mr10198178pbc.0.1334634234671; Mon, 16 Apr 2012 20:43:54 -0700 (PDT) MIME-Version: 1.0 Path: r9ni65144pbh.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: [OT] interesting reason why a language is considered good Date: Mon, 16 Apr 2012 22:43:49 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <8603135.951.1334573001928.JavaMail.geo-discussion-forums@vbbdy9> <4f8c06f5$0$7617$9b4e6d93@newsspool1.arcor-online.net> <14veb9cpamoda.ck9fbsd5m9m$.dlg@40tude.net> <4f8c3431$0$7627$9b4e6d93@newsspool1.arcor-online.net> <4f8c52b2$0$7627$9b4e6d93@newsspool1.arcor-online.net> <9s7d2eufbh6f$.1ivcyxfztaq42$.dlg@40tude.net> <4f8c93a0$0$6638$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1334634233 3596 69.95.181.76 (17 Apr 2012 03:43:53 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 17 Apr 2012 03:43:53 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-04-16T22:43:49-05:00 List-Id: "Georg Bauhaus" wrote in message news:4f8c93a0$0$6638$9b4e6d93@newsspool2.arcor-online.net... > On 16.04.12 20:00, Dmitry A. Kazakov wrote: ... >> Counter example: > > Only in case of universally quantified propositions. None of my business. > But anyway, > >> procedure Leave (When : Time); > ... > begin > while Now < When loop > delay Step; > Now := Clock; > end loop; > Left (Slot (When)) := Now; -- NB p.p. of to leave > end Leave; > > I have tried to choose only unspecific or ambiguous nouns. > Do you find this to be explaining itself well? Note the "well," > not: possible to understand for the next few moments. 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. The solution is to define the parameter names as needed for readability in calls, and then (if those names are problematic in the body), rename them for use in the body: Exit_Time : Time renames When; ... > begin > while Now < Scheduled_Departure loop > delay Pausing_Time; > Now := Clock; > end loop; > Actual_Departure (Minute_Of (Scheduled_Departure)) := Now; > end Leave; Unfortunately, this solution makes insanely wordy calls: Leave (Scheduled_Departure => Now); In many cases, the parameter names overwhelm the actual values. The "solution" usually used is to omit them from the calls altogether, reducing readability and understandability. > The first solution lets insiders pride themselves of knowing what > the generic words mean, the second solution less so, I think. > (I claim that neither is perfect.) I would suggest using both, with a renames so that within the body, you can use the longer name, and at calls you can use the shorter name. Except, of course, since it is reserved. Randy.