From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Iterators in Ada2012
Date: Tue, 08 Nov 2011 14:13:03 +0100
Date: 2011-11-08T14:13:04+01:00 [thread overview]
Message-ID: <4eb92ae0$0$6581$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <66dbca36-0248-458a-aff4-1176d6ce098b@m10g2000vbc.googlegroups.com>
On 08.11.11 11:05, comp.lang.php wrote:
> I have an instantiation of the package Ada.Containers.Ordered_Maps
> (Integer, Float). Is there a neat way of iterating over the values
> similar to the construction:
> for x of a_Set loop ... end loop.
Fear of nesting a procedure? :-)
I had thought that the new syntax of AI 139 would be for all
containers.
Strangely, the fashion seems to be moving elsewhere:
list comprehensions, Map + Reduce (US Patent #7,650,331), Scala,
... all functional, hence little sympathy for for-loops.
Sequence comprehensions are now recommended when
writing Python, so I had thought there is all the more
to say in favor of a simple automatic
Container.Iterate (Process => Meaningful_Name'Access).
But OTOH, Guido van Rossum suggested to simply write a
for-loop in place of a traditional reduce procedure.
With Ada, the two can be combined...
next prev parent reply other threads:[~2011-11-08 13:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 10:05 Iterators in Ada2012 comp.lang.php
2011-11-08 13:13 ` Georg Bauhaus [this message]
2011-11-08 13:42 ` Dmitry A. Kazakov
2011-11-09 4:12 ` R. Tyler Croy
2011-11-09 9:02 ` Simon Wright
2011-11-09 22:58 ` R. Tyler Croy
2011-11-10 8:07 ` Georg Bauhaus
2011-11-09 10:55 ` Georg Bauhaus
2011-11-25 14:20 ` Yannick Duchêne (Hibou57)
2011-11-08 21:25 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox