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.13.245.133 with SMTP id e127mr49431789ywf.57.1448648712886; Fri, 27 Nov 2015 10:25:12 -0800 (PST) X-Received: by 10.182.44.169 with SMTP id f9mr551763obm.16.1448648712851; Fri, 27 Nov 2015 10:25:12 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!b51no3538999qgf.0!news-out.google.com!l1ni156igd.0!nntp.google.com!mv3no5436288igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 27 Nov 2015 10:25:12 -0800 (PST) In-Reply-To: <1448643617.2879.6.camel@obry.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=153.181.129.1; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj NNTP-Posting-Host: 153.181.129.1 References: <0c524381-442a-49cc-9d72-27a654320153@googlegroups.com> <1448643617.2879.6.camel@obry.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1e85e103-3403-4571-bcfd-e293d396a8f5@googlegroups.com> Subject: Re: Two approaches of iterators for the key-value pairs From: ytomino Injection-Date: Fri, 27 Nov 2015 18:25:12 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28569 Date: 2015-11-27T10:25:12-08:00 List-Id: On Saturday, November 28, 2015 at 2:00:22 AM UTC+9, Pascal Obry wrote: > Le vendredi 27 novembre 2015 =E0 07:25 -0800, ytomino a =E9crit=A0: > > If you create new iterator for some key-value pairs, which approach > > do you like? >=20 > I'd like to have tuples in Ada and be able to say: >=20 > =A0 =A0for (Name, Value) of=A0Environment_Variables.All_Variables loop > =A0 =A0 =A0 Put_Line (Name & " =3D " & Value); > =A0 =A0end loop; >=20 > In many cases tuple would be handy, avoiding creating record in some > cases just to be able to return two values from a function for example. More good! I want tuples, too. Sorry, to be honest, I had not thought to extend the language, only felt aw= kward that the plural styles are mixed. However it looks attractive.