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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.200.129 with SMTP id y123mr8594833iof.103.1502413372952; Thu, 10 Aug 2017 18:02:52 -0700 (PDT) X-Received: by 10.36.107.3 with SMTP id v3mr617435itc.2.1502413372922; Thu, 10 Aug 2017 18:02:52 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!u14no104572ita.0!news-out.google.com!1ni156itx.0!nntp.google.com!u14no104563ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 10 Aug 2017 18:02:52 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 References: <79e06550-67d7-45b3-88f8-b7b3980ecb20@googlegroups.com> <9d4bc8aa-cc44-4c30-8385-af0d29d49b36@googlegroups.com> <1395655516.524005222.638450.laguest-archeia.com@nntp.aioe.org> <1502382504.2184.6.camel@obry.net> <1040032843.524077622.950797.laguest-archeia.com@nntp.aioe.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <183e2377-26b9-436f-830f-ba2021d455f6@googlegroups.com> Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language From: Lucretia Injection-Date: Fri, 11 Aug 2017 01:02:52 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:47690 Date: 2017-08-10T18:02:52-07:00 List-Id: On Thursday, 10 August 2017 18:25:30 UTC+1, Dmitry A. Kazakov wrote: > >> Should not they be named? Then it is an anonymous record type: > >> > >> function Blah return > >> record Count : Integer; Value : Float end record; No, I would prefer notation for tuples, say <> or [] as they have no use in Ada, or just use () like we do for everything else. In the compiler, it could just generate records. function Blah return ; then you could pass Blah to function which took as input (only) a tuple which matched. procedure Do_Thing (Tuple : in ); Do_Thing (Blah); Tuple : := Blah; or: Count : Integer; Value : Float; Count, Value := Blah; > I doubt any number of generics would help. No, it would lead to an explosion of generics, that's why I said it wasn't ideal. > The question is syntax of passing tuple result down. If resolved it > could help in other important cases like container element in-place > update when you want to pass the container's element down in in-out mode. If you allowed named tuples, as in above "Tuple" you could pass out as well. Each element could be accessed as Tuple.Count and Tuple.Value. Luke.