On 15 May 2013 13:54, Kenji Hara <k.hara.pg@gmail.com> wrote:
2013/5/15 Don Clugston <dclugston@gmail.com>Previously, x was just a manifest constant. Now, S now has an int inside every instance.This absolutely must not be released in this form.struct S { const int x = 7; }
This has a silent, massive breaking change --
It's OK to turn that into an error. It's not OK to silently change the meaning of existing code.Especially in such a radical manner.It will be properly documented at the top of the language changes.Certainly it will change object layout silently. But semantic meaning would not be changed in most cases,Sorry, but that is absolute rubbish.
(1) Any existing instance of this silently introduces a *severe* performance bug.
(2) Any storage of this struct silently fails.For example, for us, we serialize objects and store them in a database. This now fails because they are the wrong size.I can accept the consistency argument against the existing behaviour.However, I cannot imagine a scenario where this new behaviour would be desirable. Are there any use cases?
So just once full-recompilation would be necessary.No, this is wrong. Every existing instance must be changed. And there is no way to find them.
Seriously, this is one of the most breaking changes I can ever remember in the history of D.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta