<br><br><div class="gmail_quote">On Tue, Oct 11, 2011 at 1:46 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Oct 11, 2011, at 1:33 PM, David A. Greene wrote:<br>
<br>
> Jakob Stoklund Olesen <<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>> writes:<br>
><br>
</div><div class="im">>> How about:<br>
><br>
> foreach x = [...]<br>
><br>
> I could do<br>
><br>
> foreach x in [...]<br>
><br>
> but that requires another keyword. Do we care?<br>
<br>
</div>The syntax should be consistent with let expressions, even if the meaning is completely different.<br>
<br>
That is: "foreach x = […] in { def … }"<br>
<div class="im"><br>
>> Another thing that needs clarification is the multiple variable<br>
>> syntax:<br>
>><br>
>> for x = [1, 2, 3], y = [4, 5, 6] in { … }<br>
>><br>
>> It is not clear if you get a cross product or a 'zip'.<br>
><br>
> Che-Liang proposed a zip and I think I like that.<br>
<br>
</div>Yes, we definitely need to do a zip.<br>
<br>
I was looking for a syntax that makes it clear what is happening.</blockquote><div><br></div><div>I'd assume something like:</div><div><br></div><div> for (x, y) = [(1, 4), (2, 5), (3, 6)] in { ... }<br><br>Though I don't know a great deal about tablegen syntax. But so long as the lists are separate it seems it'd always be unclear that it was a zip.</div>
<div><br></div><div>- David</div></div>