On Saturday, 28 May 2016 at 05:30:26 UTC, chmike wrote:
Would it be different if the object was declared const instead of immutable ?

Sometimes compiler is able to figure out that const data is immutable.

This is a bit frustrating because it is trivial to implement in C and C++.

For a trick of static mutable allocation see https://github.com/dlang/druntime/pull/1325

Reply via email to