Hacker News new | ask | show | jobs
by weirdwitch 3024 days 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.

2 comments

I 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.

It took me like 2 seconds to learn it and haven't been confused since. So... maybe I'm just a grade A genius.