“I'd recommend people read this discussion of linked list vs array performance: Learn Rust With Entirely Too Many Linked Lists”
Alexis Beingessner 写的 Rust 教程,一步步实现各种链表,从最简单的栈到更复杂的变体,过程中讲清 Box、引用、生命周期、借用检查器,以及 unsafe。写法幽默,重点是展示为什么链表在 Rust 里是个难题以及怎么解决。它和官方的 The Rust Book 互补:后者讲有哪些特性,这本讲实战里怎么用。
HN 上的人几乎都把它推荐为理解借用检查器和 Rust 引用的必读材料,也常拿它回答“为什么在 Rust 里实现链表很难”;称它是循环、动态数据结构写法的权威参考。
学过 Rust 基础、想吃透所有权的人
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1先读完官方 The Rust Book 的基础部分再来
- 2每个链表版本自己敲一遍,并故意制造编译错误来理解提示
- 3先读前面几个安全版本,unsafe 部分等熟悉后再看
- 4遇到所有权困惑时回来重读相关章节
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“It takes some time though, and this tutorial helped me a lot in the beginning: Learn Rust With Entirely Too Many Linked Lists”
“this is a key (and entertaining!) unofficial resource that really hammered home for me the ways that Rust is different from the C family when it comes to working with references”
“If the Book teaches you what features Rust has, this teaches you how to use Rust in practice.”
“For the beginner there's "Learn Rust With Entirely Too Many Linked Lists"[0].”
“Then there are two books by Gankra”
看全部 20 条 →
“Reminds me of this masterpiece of a rust tutorial; Learning Rust With Entirely Too Many Linked Lists - Learn Rust With Entirely Too Many Linked Lists”
“And if you're tempted to "learn by doing" with the usual linked lists, go and read "learning rust with entirely too many linked lists": Learn Rust With Entirely Too Many Linked Lists”
“When explaining why the difficulty of modeling linked lists in Rust doesn't matter, I like to share the following book”
“I'd recommend the Learn Rust With Entirely Too Many Linked Lists [0] tutorial as the next step. It really helps you grok the borrow checker.”
“you could do worse than begin with Aria's "Learn Rust With Entirely Too Many Linked Lists"”
“If you want to learn about this, instead of using a ‘blessed’ implementation, read “too many linked lists” Learn Rust With Entirely Too Many Linked Lists.”
“This resource deals with these topics in-depth: Learn Rust With Entirely Too Many Linked Lists”
“For those that insist on learning Rust by implementing a linked list there is Learn Rust With Entirely Too Many Linked Lists.”
“Always worth plugging “Learning Rust with Entirely Too Many Linked Lists,” the canonical writing on the type of iterative approach for implementing data types with circular references in Rust”
“smarter sources: Learn Rust With Entirely Too Many Linked Lists (链接)”
“I’ve been learning Rust via the book and a great article I found on linked lists [1].”
“There are also project-based resources beyond Rustlings like Entirely Too Many Linked Lists[1] you might check out.”
“Learning variations of Linked Lists is where you start, e.g. Learn Rust With Entirely Too Many Linked Lists”
“Here is some online content on this side of Rust:”