TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rust: The Hard Parts – Part One: References, Borrowing, and Ownership

71 点作者 naftulikay大约 6 年前

1 comment

pducks32大约 6 年前
This is super fantastic. Well written and just the right amount of approachfulness and wit. Sometimes articles about things like this go too far into metaphor and lose the reader. I&#x27;d recommment going over<p><pre><code> fn mv_mutable(mut a : MyThing) {} </code></pre> a little bit as in when you might want to do this and especially<p><pre><code> fn mutable_ref_mutable(mut a : &amp;mut MyThing) {} </code></pre> as I write a lot fo rust and still never understand how this works or why its useful. Lastly maybe an explainer of conforming to `Copy` and if you should do this because I believe currently the recommendation is conform to it for any type you can and I still have to stop and think how that&#x27;s more performant. But again really great article, I bookmarked it for reference ;)
评论 #19456406 未加载