dmd 2.063 beta 5
Dicebot
m.strashun at gmail.com
Fri May 24 07:04:32 PDT 2013
On Friday, 24 May 2013 at 13:58:32 UTC, Steven Schveighoffer
wrote:
> Being able to dictate the .init data is very powerful and
> useful. You can't remove that feature.
Sure, I completely agree, thus the idea adding of CTFE-able
constructor which will become the T.init for structs.
> But the point I'm making is that the syntax IS consistent. It
> just never worked before, because of the implicit 'static'
No it is not. It never worked before because it was simply
broken. Now it works properly from the point of spec, but it is
inconsistent from the point of language design:
int x = 5; // can you tell without looking at scope if it really
initializes x or just defines .init for aggregate?
Initializer syntax does not really make sense for non-static
aggregate members at all, mutable or not.
More information about the Digitalmars-d-announce
mailing list