<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-03-26 2:33 GMT+09:00 Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org" target="_blank">SeeWebsiteForEmail@erdani.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After the recent discussions regarding the comma operator, and after inspecting the patterns of code affected by it, Walter and I would back up the following change to the D language:<br>

<br>
1. The comma operator stays with its current syntax.<br>
<br>
2. The semantics is the same unless warnings are enabled with "-w"<br>
<br>
3. In "-w" mode, semantics are changed in that the type of the comma operator is NOT the type of its last expression, but instead it's void.<br>
<br>
4. Later on the warning will be promoted to a deprecation followed by removal from the language.<br>
<br>
5. Reintroducing the result type as a tuple remains a future possibility.<br>
<br>
We believe the change would be beneficial for the following reasons:<br>
<br>
1. Based on druntime and phobos, the breakage is likely to be infrequent.<br>
<br>
2. The change may catch (and has caught) important bugs caused by misplacing closing parentheses.<br>
<br>
3. Most code using the result of the comma expression looks foreign even to seasoned programmers and might gain in clarity from a refactor.<br>
<br>
<br>
Please reply to discuss this possibility.</blockquote><div><br></div><div>Sounds good. Typing comma expressions as void would be a good way.</div><div><br></div><div>Kenji Hara</div></div></div></div>