On Wednesday, 23 September 2015 at 14:34:07 UTC, bachmeier wrote:
I was not aware that you could "violate" immutable. In that case, it's not immutable.
You can violate absolutely everything in a system language with casts and pointers. That is exactly what makes it system language. But you do so only by intentionally and explicitly abandoning type system and domain of well-defined behaviour. Compiler could as well decide to put it in RO section of executable resulting in app crash at runtime (that happens with string literals on Linux). Any cast means "I know what I am doing and I am fully prepared to get burned".