<div dir="ltr">2013/2/10 bearophile <span dir="ltr"><<a href="mailto:bearophileHUGS@lycos.com" target="_blank">bearophileHUGS@lycos.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Now I have a good amount of code broken by:<br>
<br>
alias x = 5;<br>
</blockquote><div><br></div><div>This syntax never been valid in past, because alias declaration cannot make alias of an expression.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
alias this = foo;<br></blockquote><div><br></div><div style> This syntax was introduced very recent, in 2.061.</div><div style><br></div><div style>======</div><div style><br></div><div style>From 2.061, we have get new alias syntax by fixing issue 3011.</div>
<div style><a href="http://d.puremagic.com/issues/show_bug.cgi?id=3011">http://d.puremagic.com/issues/show_bug.cgi?id=3011</a><br></div><div style><br></div><div style>Now we can write alias declaration as follows:</div><div style>
<br></div><div style>alias Integer = int;</div><div style>alias IntArray = int[];</div><div style><br></div><div style>These syntax are continuously valid in 2.062.</div><div style><br></div><div>But, while a discussion for the compiler fix, a wrong syntax change, which has similar look but definitely different meaning, had been introduced.</div>
<div style><a href="https://github.com/D-Programming-Language/dmd/pull/1187">https://github.com/D-Programming-Language/dmd/pull/1187</a><br></div><div style><br></div><div style>struct S {</div><div style>    int value;</div>
<div style>    alias value this;   // old syntax</div><div style>    alias this = value;  // new syntax, from 2.061</div><div style>}</div><div style><br></div><div style>I opened the pull request #1413 in the beta term for 2.061, but it had _accidentally_ released without deeply discussion.</div>
<div style><a href="https://github.com/D-Programming-Language/dmd/pull/1413">https://github.com/D-Programming-Language/dmd/pull/1413</a><br></div><div style><br></div><div style>I think and believe that we MUST reset things.</div>
<div style><br></div><div style>Kenji Hara</div></div></div></div>