[llvm-commits] [PATCH 01/13] Add For Loop Structures

Rotem, Nadav nadav.rotem at intel.com
Fri Feb 3 13:18:34 PST 2012


David, 

Maybe I missed this in previous emails, but I am not sure what is the motivation for the zip operator. 

Thanks,
Nadav

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of David A. Greene
Sent: Friday, February 03, 2012 21:10
To: Jakob Stoklund Olesen
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] [PATCH 01/13] Add For Loop Structures

Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:

>> Ping?
>
> I'll get to this.

Ok, thanks.

> Are you planning more changes?

The other change I'm considering is related to foreach but also useful in its own right.  I'd like to introduce a zip operator so we can do things like this:

foreach {int a, int b} = !zip([1, 3, 5, 7], [2, 4, 6, 8]) {
  ...
}

Otherwide there is no easy way to iterate over multiple lists "in tandem."  I think this was identified as a desirable feature.

The above isn't implemented yet.

                       -Dave
_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list