3 ms·
From a smart friend Rust needs a better tutorial of ownership. It's novel, so it warrants the most explanation.
by alexnewman 11y ago
From a smart friend
Rust needs a better tutorial of ownership. It's novel, so it warrants the most explanation.
- weaksauce 11y agoThe tutorial in here seems pretty good: http://doc.rust-lang.org/book/ownership.html http://doc.rust-lang.org/book/ownership.html and the following three pages discuss it in some detail.
- steveklabnik 11y agoIt's good at the basics, but we need more intermediate / advanced stuff. This is true of the book in general.
- Q6T46nT668w6i3m 11y agoI agree. However, there is a lot of information about RAII in C++ that's reasonably translatable.
- mbrubeck 11y agoI agree. I personally found these two blog posts to be useful introductions to ownership and borrowing: http://blog.skylight.io/rust-means-never-having-to-close-a-socket/ http://blog.skylight.io/rust-means-never-having-to-close-a-s... http://arthurtw.github.io/2014/11/30/rust-borrow-lifetimes.html http://arthurtw.github.io/2014/11/30/rust-borrow-lifetimes.h...
- badpenny 11y agoI may just be not very bright but I've read both of those plus the coverage in the aforementioned book and I still regularly find myself banging my head against the borrow checker when writing code myself. I think at least part of the problem is the use of trivial examples. I don't seem to have any problems with any of the other concepts used by the language except where they overlap with the borrow checker (e.g. destructuring a Box using).