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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3867e2f73fa21ec X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII X-Received: by 10.66.119.67 with SMTP id ks3mr4782951pab.20.1367623790400; Fri, 03 May 2013 16:29:50 -0700 (PDT) MIME-Version: 1.0 Path: bp1ni1481pbd.1!nntp.google.com!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada 2012: In-out parameters for functions Date: Fri, 3 May 2013 18:29:46 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1367623789 20660 69.95.181.76 (3 May 2013 23:29:49 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 3 May 2013 23:29:49 +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: 2013-05-03T18:29:46-05:00 List-Id: "Yannick Duch�ne (Hibou57)" wrote in message news:op.wwibdpw7ule2fv@cardamome... ... >But that's a bit like the `non null` for access type, which should have >been the default. Would be better if to have to explicitly says you know >the argument may be modified, instead of explicitly say you expect it to >not be modified and add parentheses everywhere. Right, but of course Ada gets this wrong from the very beginning. "constant" should be the default (everywhere), and you ought to have to declare variables. Something like: A : variable Integer; Len : Integer := 10; Len2 : constant Integer := 10; -- Same as the previous. That's how parameters work, after all. I agree that named notation should include the direction of the parameter, but again its way too late to fix. The best syntax would have been Proc (In_Param => A, Out_Param <= B, In_Out_Param <=> C); but unfortunately "<=" is used for less-than-or-equals and trying to use it in this context would be ambiguous. So the best practical syntax would be: Proc (In_Param -> A, Out_Param <- B, In_Out_Param <-> C); But adding new compound delimiters has never been done (lexical elements are unchanged since Ada 83, the only changes being to allow Unicode characters in identifiers and strings), and this scares people. Moreover, we don't have any current delimiters that have three characters. So this would likely have a lot of change to tools, at a very fundemental level. I suppose if I was designing a new Ada-like language, this is one of the things I would do. (Along with overloading for objects and exceptions, replacing untagged derived types with some sort of type renaming, and a reduction in little used features). Randy.