3 ms·
The bit that I was intending to modify was your statement that "in FP changes in RAM are incidental and the programmer need not manage them". With IORef, chang
by dllthomas 12y ago
The bit that I was intending to modify was your statement that "in FP changes in RAM are incidental and the programmer need not manage them". With IORef, changes in RAM are not incidental, and the programmer is explicitly managing them. If IORef isn't direct enough for you, substitute Ptr. The fact that it happens in the runtime system does not necessarily mean that it is incidental or that it does not need to be managed by the programmer.
As to your broader claim here, I while I understand what you're getting at (and probably wouldn't have bothered responding, but for the above) I think it's most precise to say that IORef is an encoding of state. This does not have to mean that state gets updated by means of side effects.