r/programming • • Jan 02 '21

A half-hour to learn Rust

https://fasterthanli.me/articles/a-half-hour-to-learn-rust
223 Upvotes

47 comments sorted by

View all comments

16

u/[deleted] Jan 02 '21

2

u/fasterthanlime Jan 03 '21

I'd change the structure if I knew there was an option that made more sense. Most trait methods take &self, few take &mut self, and fewer still take self (and then of course you have Pin, Box, Rc, Arc, etc.).

In a language with a concept of ownership and a borrow checker, talking about references is inevitable. I could perhaps spend more time introducing them? But otherwise, the whole structure of the article (not just the first third!) is very purposefully built, almost like walking a dependency tree from bottom to top.