Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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 ? :)



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.


To put that another way: hardware failures are beyond the scope of the compiler.


Maybe your compiler.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: