3 ms·
> In D, `immutable(int)* x` cannot be changed by any reference to the value. even if I use a magnetic needle to change the bits in my RAM ? :)
by jcelerier 6y ago
> In D, `immutable(int)* x` cannot be changed by any reference to the value.
even if I use a magnetic needle to change the bits in my RAM ? :)
- petertodd 6y agoThere's an easy answer to that: using a magnetic needle to change the bits in your RAM violated the assumptions of the compiler, leading to undefined behaviour. What exactly will happen in that circumstance is just that: undefined.
- MaxBarraclough 6y agoTo put that another way: hardware failures are beyond the scope of the compiler.
- wizzwizz4 6y agoMaybe your compiler.