<div dir="ltr"><div>2014-03-24 10:09 GMT+09:00 bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com" target="_blank">bearophileHUGS@lycos.com</a>></span>:<br></div><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">Andrei Alexandrescu:<br>

<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Discuss: <a href="https://github.com/D-Programming-Language/dmd/pull/3399" target="_blank">https://github.com/D-<u></u>Programming-Language/dmd/pull/<u></u>3399</a><br>
</blockquote>
<br></div>Regarding the "progress", I'd like a good built-in syntax to unpack tuples in assignments, inside function signatures, in foreach statements, and more, because the syntactic contortions I currently adopt to use tuples in D are bad.<br>
</blockquote><div><br></div><div>I'm partially against to it.</div><div><br></div><div>1. I think removing comma operator does not have useful effect for tuple syntax discussion. For example:</div><div><br></div><div>
   1a. If you want to use parenthesis syntax (...) for tuple, we should resolve one-element tuple ambiguity first.</div><div>         (exp)   // one-element tuple, or just an expression ?</div><div>      And,  removing comma operator does not resolve this issue.</div>
<div><br></div><div>   1b. If you choose other syntax for tuple, comma operator will be no longer related to tuple syntax discussion.</div><div>        {exp, exp2}  // eg. using brace for tuple syntax no longer touch to comma operator</div>
<div><br></div><div>2. Indeed in some case comma operator is bug-prone, but if it is used directly on the ExpStatement, it's still useful to me.</div><div><br></div><div>    foreach (e; exp1, exp2) {}   // maybe bug?</div>
<div>    if (cond) exp1, exp2;   // in most case, this is not a bug.</div><div><br></div><div>   So, completely removing comma operator will cause negative affect in some cases.</div><div><br></div><div>Kenji Hara</div></div>
</div></div>