[dmd-beta] dmd 2.064 beta take 2

Михаил Страшун m.strashun at gmail.com
Wed May 15 04:59:39 PDT 2013


It is not an error (actually, old behavior smells like a bug for
sure), but it is incredibly inconvenient breaking change for any code
that relies on exact object layout and such code is not that rare.
Some better transition path is really desired here.

On Wed, May 15, 2013 at 2:54 PM, Kenji Hara <k.hara.pg at gmail.com> wrote:
> 2013/5/15 Don Clugston <dclugston at gmail.com>
>>
>> This absolutely must not be released in this form.
>> This has a silent, massive breaking change --
>> struct  S { const int x = 7; }
>> Previously, x was just a manifest constant. Now, S now has an int inside
>> every instance.
>> 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.
> https://github.com/D-Programming-Language/d-programming-language.org/pull/303/files#L0R60
>
> Certainly it will change object layout silently. But semantic meaning would
> not be changed in most cases, So just once full-recompilation would be
> necessary.
> I think that it is not a problem which deserves to reject the code by
> compilation error.
>
> Kenji Hara
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta


More information about the dmd-beta mailing list