Y
Hacker News
new
|
ask
|
show
|
jobs
by
jcelerier
1928 days 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 ? :)
1 comments
petertodd
1928 days ago
There'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.
link
MaxBarraclough
1928 days ago
To put that another way: hardware failures are beyond the scope of the compiler.
link
wizzwizz4
1928 days ago
Maybe
your
compiler.
link