jml's notebook

Reading: Rust Programming Language

My daughter's nursery has been closed this week, so I've mostly taken this week off to look after her.

To get my technical fix, I've been reading the printed copy of the Rust Book. I've flicked through the free, online version often enough, but I wanted to sit down and actually understand things, rather than play whack-a-mole on occasional topics of ignorance.

It's a really good book, if you want to learn Rust. It's structured very well, so reading straight through makes a lot of sense. The writing is clear, and the examples are simple and illuminating without being cute or overly contrived.

The tone is great, too. It feels like you've got someone by your side helping you. The book also emphasises Rust's open source nature, often saying that the things in the language were built by people like you (the reader), and maybe you can do something cool like that too.

Now that I'm actually tinkering with Rust again, there are definitely parts that haven't stuck. I still haven't quite internalised how references and slices relate to each other--just what is the difference between &[u8] and &Vec<u8>--and I'm still playing whack-a-mole when I use iterators?

I also found the chapter on smart pointers a bit of a drag, because I wasn't really sure that I would need to actually use that functionality. Then I go off and implement something that messes with comrak, which uses RefCell everywhere.

If you're already a programmer (even if you're not very experienced) and you'd like to learn Rust, you should read this book. If you're not sure if you'd like to learn Rust, maybe start reading this book and see.