Also one issue Don has brought my attention to is this snippet:
// -----------------------------
immutable int x = 1;
void main()
{
import std.stdio;
writeln(x);
}
static this()
{
x = 42;
}
// (does not compile in 2.062 and won't in 2.063)
// ------------------------------
Whatever approach is taken, I think it should be consistent with
structs/classes in a sense that global variables are module
members and module constructor is, well, constructor.
But it looks very hard to do because "immutable" is implicitly
"shared". Ideas?