What is `Box<str>` and how is it different from `String` in Rust?
I recently gave a Rust workshop to Kotlin and Swift developers. Strings in Rust are a really, really difficult topic for complete newcomers because they're understood as a basic type whereas in Rust they require having read half the Rust book to grasp.<p>Consider: I can teach a lot of Rust basic with `usize`. Defining funcions, calling functions, enums because they're `Copy` and because there's only one type. String requires knowing about &str which requires knowing about deref which requires knowing about (&String -> &str), it also requires understanding lifetimes, moving, heap and stack, cloning. Then, if you want to work with the file system you also need to understand Paths, OsString and AsRef.<p>With Kotlin and Swift, for all these things, you really just need one type, String, and you handle it just like usize.<p>It is really a bid of a hurdle for new developers coming from higher level languages (especially if they just give it a quick try).