Failed to contribute due to difficulty in understanding Rust

I would like to expand a little on this (which I endorse) because I happen to have talked about this effect recently:

I have the unsubstantiated theory that experienced developers have a harder time than less experienced developers when learning Rust. You need to forget a lot of constructs that work well enough in the languages you already know because they introduce things that go against the single owner enforcement that Rust has, whereas somebody with less experience will simultaneously accept restrictions as "just the way it is" and not seek out more performant constructs that can be much harder to understand or implement.

Rust has a curse (it has many, but this one is critical): inefficient code is generally visible. Experienced developers hate to notice that their code is inefficient. They will recoil at seeing Arc<RefCell<T>>, but won't bat an eye at using Python. I know because I have the same instinct! This makes it much harder to learn Rust for experienced developers because they start with the "simple Rust code that will work but is slightly inefficient" and in an effort to improve it they land squarely in parts of the language they haven't yet developed a mental model for.

Someone tell me what am I missing.

Don't worry about being fast. .clone() to your heart's content. Use Arc and Box if you need to. Get comfortable with the language first and then try to expand into understanding the more advanced uses and patterns that you might have already used in the past.

23 Likes