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,ASCII-7-bit X-Received: by 10.224.59.205 with SMTP id m13mr20324809qah.7.1367629330749; Fri, 03 May 2013 18:02:10 -0700 (PDT) X-Received: by 10.50.40.99 with SMTP id w3mr35071igk.12.1367629330703; Fri, 03 May 2013 18:02:10 -0700 (PDT) Path: y6ni0qax.0!nntp.google.com!m7no881087qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 3 May 2013 18:02:10 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ NNTP-Posting-Host: 66.126.103.122 References: <7704abab-86f2-4edc-ad4b-b3d4e70004fb@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <885a6f9e-cb8b-4823-9f02-3cab5f172076@googlegroups.com> Subject: Re: Ada 2012: In-out parameters for functions From: Adam Beneschan Injection-Date: Sat, 04 May 2013 01:02:10 +0000 Content-Type: text/plain; charset=ISO-8859-1 Date: 2013-05-03T18:02:10-07:00 List-Id: On Friday, May 3, 2013 4:29:46 PM UTC-7, Randy Brukardt wrote: > 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. This particular change would break any code that looks like if X<-1 then ... and you just gotta know that there's some out there, no matter how ugly it looks. Ada 80 (?) would have said Proc (In_Param =: A, Out_Param := B, In_Out_Param :=: C) Don't know why they didn't stick with it. -- Adam