3 ms·
> I want to see the value of a field. I don't want an owned copy of said value, I just want to look at it, so returning reference makes _a lot more_ sense than
by akira2501 2y ago
> I want to see the value of a field. I don't want an owned copy of said value, I just want to look at it, so returning reference makes _a lot more_ sense than returning a copy.
You can look at it with an owned copy. What is the issue? Is premature optimization the default mode in writing Rust? You don't see the issues with this?
> I'm expressing surprised that you think it's bad
You're surprised that someone simply has a different opinion? Your reaction failed to convey that.
- 0x457 2y ago> You can look at it with an owned copy. What is the issue? Is premature optimization the default mode in writing Rust? You don't see the issues with this? uhm, common sense isn't a premature optimization. Avoiding a needless copy is the default mode in writting rust and any other language.