>Rust references semantically closer to being mutexes evaluated at compile-time
This is brilliant. Do you have a blog(or anything that comes close to it) about Rust?
This is brilliant. Do you have a blog(or anything that comes close to it) about Rust?
When a unique reference (&mut T) exists then the only possible way to even look at the data is through that unique reference. In that situation, there's no reason to have any restrictions on mutation, because nothing else can observe it.
With shared references (&T), multiple parts of the program can access the data at the same time. If you mutate in that situation you can end up with memory corruption due to data races, so mutation has to be restricted to require runtime synchronization through RefCells, Mutexs, etc.