[dmd-beta] dmd 2.064 beta take 2

Михаил Страшун m.strashun at gmail.com
Wed May 15 07:14:17 PDT 2013


Don't forget about S.init - const element initializer changes it and
makes sense in that way. So you may have both cont element with
initializer and constructor that changes it later. It is completely
legitimate D code, despite the fact I can't imagine any use case for
it now.

On Wed, May 15, 2013 at 5:11 PM, Don Clugston <dclugston at gmail.com> wrote:
>
>> You kind of propose that "const int" to be a completely different type
>> depending on initialiser. It is horrible.
>
>
> I have not said that. I've asserted that const member with an initializer,
> when inside a struct, is ALWAYS a bug.
> I agree that we need to get rid of the existing behaviour. But I argue it
> should simply be an error, rather than replacing it with a misfeature.
>
> _______________________________________________
> 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