comprehensive-rust icon indicating copy to clipboard operation
comprehensive-rust copied to clipboard

Suggestion: Don't shy away from concurrent structures early on

Open QuineDot opened this issue 2 years ago • 1 comments

I found it sort of odd that Arc and friends weren't mentioned until the last day, while for example you have a slide on Rc (also mentioning RefCell and Cell in passing) Why not mention Arc as well? If you use Rc, you're opting out of being able to be multi-threaded... and one of the great things about Rust is how it assumes you're going to want to be concurrent eventually. If Rc<T> meets your shared-ownership needs, usually Arc<T> does too.

Other places they come up:

QuineDot avatar Dec 27 '22 00:12 QuineDot

Good point. Let me start by mentioning Arc on the Rc page (#83).

mgeisler avatar Dec 28 '22 09:12 mgeisler