3 ms·
That's...the state monad. The compiler tells you when you try to access it in a way that is not allowed. But the price for that is that I always have to access
by Chris_Newton 13y ago
That's...the state monad. The compiler tells you when you try to access it in a way that is not allowed.
But the price for that is that I always have to access it in a cumbersome way, even when being so explicit makes no useful difference to the correctness of my code.
You have to be explicit with sharing.
I don’t want to be explicit with sharing.
I want to be explicit with sharing when it matters, and otherwise not to worry about it, safe in the knowledge that the language will warn me if I try to do something later that invalidates any assumptions I’m making now.