[LLVMdev] Enhancing TableGen
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Oct 11 13:46:30 PDT 2011
On Oct 11, 2011, at 1:33 PM, David A. Greene wrote:
> Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>
>> How about:
>
> foreach x = [...]
>
> I could do
>
> foreach x in [...]
>
> but that requires another keyword. Do we care?
The syntax should be consistent with let expressions, even if the meaning is completely different.
That is: "foreach x = […] in { def … }"
>> Another thing that needs clarification is the multiple variable
>> syntax:
>>
>> for x = [1, 2, 3], y = [4, 5, 6] in { … }
>>
>> It is not clear if you get a cross product or a 'zip'.
>
> Che-Liang proposed a zip and I think I like that.
Yes, we definitely need to do a zip.
I was looking for a syntax that makes it clear what is happening.
/jakob
More information about the llvm-dev
mailing list