3 ms·
I completely agree. Path/PathBuf have better names, but the distinction still isn't immediately obvious. String/str is the cause of so much confusion.
by weirdwitch 9y ago
I completely agree.
Path/PathBuf have better names, but the distinction still isn't immediately obvious.
String/str is the cause of so much confusion.
- steveklabnik 9y agoI often joke that str/StrBuf is my one wish for a Rust 2.0, but 2.0 will never happen. This confusion is why we reorganized the book to talk about String and &str very early on, and use them to teach ownership and borrowing.
- Retra 9y agoIt took me like 2 seconds to learn it and haven't been confused since. So... maybe I'm just a grade A genius.