Just starting off with Rust, this has been the best resource for feeling comfortable with the language. author @fasterthanlime

MonkCanatella@sh.itjust.works to Programming@programming.dev – 85 points –
Day 1 (Advent of Code 2022)
fasterthanli.me

cross-posted from: https://sh.itjust.works/post/5850736

This is the resource I've been looking for. I'm working my way through the book but it gets in the weeds really early. It's all fun and games and then chapter 4 just hits like a brick wall. Amos does a tremendous job explaining the why behind things, in a more wheels to the pavement way.

12

You are viewing a single comment

Static types aside, the file system has a lot of failure cases, which every language is affected by, and Rust makes them very visible. This can indeed feel like a lot, but it's an intentional feature and makes more sense in larger projects. I guess the feeling may get amplified by the author's style of long form posts with a lot of details.

Error handling in practice contains a lot of "let the caller deal with it", using the ? operator to pass errors up the call stack. The more verbose options are for when you need to actually handle it.

the file system has a lot of failure cases

Oh for sure, like I said this makes a lot of sense. All I was saying was that as a pitch for learning the language, the part after the file read had been sorted was much more compelling and interesting.

Absolutely, I didn't mean to suggest otherwise. :) I'm just giving a bit of context and perspective from someone who has used it for a while.