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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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.69 with SMTP id tu5mr13796112pbc.6.1334679310040; Tue, 17 Apr 2012 09:15:10 -0700 (PDT) Path: r9ni67143pbh.0!nntp.google.com!news2.google.com!goblin3!goblin.stu.neva.ru!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: [OT] interesting reason why a language is considered good Date: Tue, 17 Apr 2012 18:15:04 +0200 Organization: cbb software GmbH Message-ID: <146segtlt6uuq$.uhujfbcu0yuf.dlg@40tude.net> 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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: Gbl624r6iuNIccy3ASy5ag.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-04-17T18:15:04+02:00 List-Id: On Tue, 17 Apr 2012 16:48:23 +0100, Simon Wright wrote: > "Randy Brukardt" writes: > >> 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. > > Your "insanely wordy" is my "perfectly natural"! > > procedure Serve (Using_Port : GNAT.Sockets.Port_Type; > At_Priority : System.Priority := System.Default_Priority; > With_Stack : Positive := 20_000; > Logging_Via : Logger := null; > Tracing : Boolean := False); > > called as > > Serve (Using_Port => 8080, > With_Stack => 40_000, > Tracing => Verbose); > > Now that I look at them, both would probably be improved with a bit of > alignment: > > Serve (Using_Port => 8080, > With_Stack => 40_000, > Tracing => Verbose); Why not "With_Tracing" then? In "Using_Port" "Using" is just noise, as well as "With" in "With_Stack." My take would be: Serve (Port => 8080, Max_Stack_Depth => 40_000, Tracing_Level => Verbose); P.S. I would never use an abstraction with side-effects. I.e. Serve would become an operation of some explicit Connection, Worker etc object keeping the state. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de