Web developers who made the move to Rust -- what concepts did you most struggle on?
Hi all! I'm working on a short talk that is focused on targeting some common pain points that web developers face (primarily Typescript, but not necessarily has to be) when making the move to Rust
It's focused on identifying scenarios where people new to the language often get stuck, particularly if they approach it in a "Typescript" kind of way when Rust might expect something different
So if anyone has gone through that transition themselves and has any advice or experiences to offer about things they learned along the way they would find helpful -- I'd appreciate any input at all.
Basically anything where you remember saying "damn, I wish someone had told me this at the beginning"
Some assorted examples I've got in mind currently:
The type system impacting program behaviour with things like
.collect()and.into()Very common operations like working with the
ResultandOptiontypes, focusing onmatchwhen learning rather than trying to internalize the huge list of convenience methodsThe idea that iterators are a separate concepts from things like vectors and arrays
The use of
enumin cases where you'd reach for a discriminated union in Typescript
I'd like to keep it fairly light and focused on "quick wins" that would enable web devs to get up and productive quickly, so I'm looking for things similar to the above examples moreso than something like "understanding the concept of ownership", even though that's obviously important