<div dir="ltr"><div dir="ltr">On Fri, Apr 24, 2020 at 5:05 AM Stefan Koch via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thursday, 23 April 2020 at 18:57:04 UTC, Steven Schveighoffer <br>
wrote:<br>
> On 4/23/20 2:18 PM, Stefan Koch wrote:<br>
>> [...]<br>
><br>
> The question is whether the expanded inner expression is <br>
> considered a tuple for expansion later or not.<br>
><br>
> alias tuple1 = AliasSeq!(1, 2, 3);<br>
> alias tuple2 = AliasSeq!(4, 5, 6);<br>
> pragma(msg, [AliasSeq!(tuple1..., tuple2)...]);<br>
><br>
> If it expands tuple1 first, then expands tuple 2 without <br>
> re-expanding the result of tuple1..., then it should be:<br>
><br>
> [1, 2, 3, 4, 1, 2, 3, 5, 1, 2, 3, 6]<br>
><br>
> If it expands both tuple1 and tuple2 together, it should be:<br>
><br>
> [1, 4, 2, 5, 3, 6]<br>
><br>
> -Steve<br>
<br>
It's the latter.<br>
you cannot re-expand.<br></blockquote><div><br></div><div>I think the former is correct though. And that's a trivial change.</div><div><br></div><div>Our existing code will evaluate the latter, but that only happens because I put a special-case for doing that... and I think that special case is wrong. Natural semantics with no special handling is preferred. It allows much more articulate control, and creates more opportunities.</div></div></div>