<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 15 May 2013 13:54, Kenji Hara <span dir="ltr"><<a href="mailto:k.hara.pg@gmail.com" target="_blank">k.hara.pg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">2013/5/15 Don Clugston <span dir="ltr"><<a href="mailto:dclugston@gmail.com" target="_blank">dclugston@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div><div><div>This absolutely must not be released in this form.<br>This has a silent, massive breaking change --<br></div>struct S { const int x = 7; }<br></div>Previously, x was just a manifest constant. Now, S now has an int inside every instance.<br>
</div><div>It's OK to turn that into an error. It's not OK to silently change the meaning of existing code.<br></div><div>Especially in such a radical manner. </div></div></blockquote><div><br></div></div><div>It will be properly documented at the top of the language changes.</div>
<div><a href="https://github.com/D-Programming-Language/d-programming-language.org/pull/303/files#L0R60" target="_blank">https://github.com/D-Programming-Language/d-programming-language.org/pull/303/files#L0R60</a></div>
<div>
<br></div><div>Certainly it will change object layout silently. But semantic meaning would not be changed in most cases,</div></div></div></div></blockquote><div><br></div><div>Sorry, but that is absolute rubbish.<br>(1) Any existing instance of this silently introduces a *severe* performance bug.<br>
</div><div>(2) Any storage of this struct silently fails.<br><br></div><div>For example, for us, we serialize objects and store them in a database. This now fails because they are the wrong size.<br><br><div>I can accept the consistency argument against the existing behaviour.<br>
</div>However, I cannot imagine a scenario where this new behaviour would be desirable. Are there any use cases?<br><br></div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> So just once full-recompilation would be necessary.</div></div></div></div></blockquote><div><br></div><div>No, this is wrong. Every existing instance must be changed. And there is no way to find them.<br>
</div><div><br></div><div>Seriously, this is one of the most breaking changes I can ever remember in the history of D.<br></div></div></div></div>