May 15, 2013 Re: [dmd-beta] dmd 2.064 beta take 2 | ||||
---|---|---|---|---|
| ||||
I think the const member with a default overridden by a constructor thing makes perfect sense to me. The one thing bugging me about the complaint about the breaking change is that it's a very easy issue to address. There are two solutions I like.
static const int x = 3; // static gets us out of struct storage.
enum int x = 3; // A strictly compile-time constant.
So, you just insert a few characters and the issue has been addressed. The way I see it, D is not C++, so breaking changes will happen from time-to-time in order to make the language saner. const being part of the struct is sane because it's consistent.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta
|
Copyright © 1999-2021 by the D Language Foundation