[dmd-beta] dmd 2.064 beta take 2

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


> I agree with that, but...
> I think the new behaviour is a misfeature, and nothing more. It makes no
> sense to store a value in each struct, when the value is exactly the same
> every time.
> My assert: 100% of these cases are bugs.

It is not:

struct S
{
const int x;
this(int ax)
{
x = ax;
}
}

void main()
{
import std.stdio;
writeln(S(41));
writeln(S(42));
}

You kind of propose that "const int" to be a completely different type
depending on initialiser. It is horrible.


More information about the dmd-beta mailing list