3 ms·
When explaining why the difficulty of modeling linked lists in Rust doesn't matter, I like to share the following book, "Learn Rust With Entirely Too Many Linke
by kibwen 4y ago
When explaining why the difficulty of modeling linked lists in Rust doesn't matter, I like to share the following book, "Learn Rust With Entirely Too Many Linked Lists", written by the woman who wrote the implementation you've linked above: https://rust-unofficial.github.io/too-many-lists/ https://rust-unofficial.github.io/too-many-lists/
- keepquestioning 4y agoI read this and noped out of learning Rust.
- kelnos 4y agoSo I glanced at it, expecting something much much worse, but I was surprised to see it wasn't that bad. Even if you look at the final code for the final implementation, it doesn't seem much more complex than what you'd have to write in C. And a good chunk of the code is implementing traits from the stdlib, stuff that isn't strictly necessary, but makes it easier to make the API of the deque idiomatic and work well with other stdlib (and non-stdlib) APIs. And regardless, this book is teaching from the perspective of intentional super-hard-mode. Most Rust developers will never have to write that much unsafe code.
- hinkley 4y agoAre you bragging about self imposed ignorance of advanced programming topics? I guess there’s plenty of space in the world for PHP programmers and their predecessors, the VB programmers. So… congrats?
- adeptima 4y agoMy first thought it was a joke ... ;) Learn Rust with entirely too many linked lists (2019) - https://news.ycombinator.com/item?id=22390662 https://news.ycombinator.com/item?id=22390662 - https://rust-unofficial.github.io/too-many-lists/index.html https://rust-unofficial.github.io/too-many-lists/index.html In this series I will teach you basic and advanced Rust programming entirely by having you implement 6 linked lists. In doing so, you should learn: - The following pointer types: &, &mut, Box, Rc, Arc, const, mut, NonNull(?) - Ownership, borrowing, inherited mutability, interior mutability, Copy - All The Keywords: struct, enum, fn, pub, impl, use, ... - Pattern matching, generics, destructors - Testing, installing new toolchains, using miri - Unsafe Rust: raw pointers, aliasing, stacked borrows, UnsafeCell, variance