Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> 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.



> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: