class C { readonly myClass mc;
this() { mc = new myClass(); } void doSomething() {mc = new myClass(); // wrong! result in compiler error, mc is readonly
} }Does D have something like this natively or there's a way to do so with traits/CTFE at runtime?