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: a07f3367d7,3867e2f73fa21ec X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.224.217.195 with SMTP id hn3mr29082566qab.5.1367758338843; Sun, 05 May 2013 05:52:18 -0700 (PDT) Path: y6ni11051qax.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin1!goblin.stu.neva.ru!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Bill Findlay Newsgroups: comp.lang.ada Subject: Re: Ada 2012: In-out parameters for functions Date: Sun, 05 May 2013 13:52:18 +0100 Message-ID: References: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> Mime-Version: 1.0 X-Trace: individual.net HQoRHV3GZSX7LI4Uzf0RTwt9EyyciLcRCZJ6MVred2SyrzlQ7u Cancel-Lock: sha1:MCts8U5sryfSwcU4HYfDQ9GZs3I= User-Agent: Microsoft-Entourage/12.33.0.120411 Thread-Topic: Ada 2012: In-out parameters for functions Thread-Index: Ac5Jj1/+ovvgexYw40SkxU+rXI31nA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Date: 2013-05-05T13:52:18+01:00 List-Id: On 05/05/2013 12:11, in article op.wwlyp5ymule2fv@cardamome, "Yannick Duchêne (Hibou57)" wrote: > Le Sun, 05 May 2013 12:24:50 +0200, Niklas Holsti > a écrit: > >> How about reusing the mode keywords: >> >> Proc ( >> In_Param => in A, >> Out_Param => out B, >> In_Out_Param => in out C); >> > >> An alternative, perhaps more English-like, […] >> >> Proc ( >> in In_Param => A, >> out Out_Param => B, >> in out In_Out_Param => C); >> > > But may be the first is more Chinese‑like :P (I don't know, I don't know > Chinese) > > Not joking, the first looks better to me, it better express what it means > as the mode is closer to the actual parameter which is the subject of the > mode (the same way at the declaration, it is closer to the type, which is > the best to me for a similar reason). > > Seems this topic was not discussed at all for Ada 2012. I'm glad to hear it, because the idea is bonkers. Declarations collect relevant info to one easily found place in the code, instead of having it splattered around at random. These suggestions about parameter mode make no more sense than suggesting that, instead of declaring: I : Integer; S ; String; One should instead have to write things like: I% := I% + 1; S$ := ""; (A la BASIC) -- Bill Findlay with blueyonder.co.uk; use surname & forename;