You can do the same to a pointer in languages that have them, either directly (e.g. in C) or through some "unsafe" construct (e.g. in Rust, C#, Go).
>I don't see why anyone wouldn't copy values by default... it is the only sane way to do things.
When resources are ample, yes. Not the case historically, or in many use cases today.
And not all values make sense to copy.
But also in Rust, we're talking in the context of C performance needs, memory models, and concepts, and Rust expands and makes those safe.
You can do the same to a pointer in languages that have them, either directly (e.g. in C) or through some "unsafe" construct (e.g. in Rust, C#, Go).
>I don't see why anyone wouldn't copy values by default... it is the only sane way to do things.
When resources are ample, yes. Not the case historically, or in many use cases today.
And not all values make sense to copy.
But also in Rust, we're talking in the context of C performance needs, memory models, and concepts, and Rust expands and makes those safe.