|
|
|
|
|
by tormeh
3421 days ago
|
|
Copying everything every time is a trivial (and very slow) solution to the memory safety problem. It just means that everything is on the stack (or at least that only one stack frame has a reference to any given object), so it is simply deallocated along with the stack frame. That's it. There's nothing unsafe about it. What do you mean by saying mutability is for safety? That's a very unusual opinion. |
|
Copying everything every time isn't a solution in a multithreaded world if you actually want your threads to share data.