4 ms·
&str vs String. Oh boy.
by klaussilveira 3y ago
&str vs String. Oh boy.
- brabel 3y agohttps://raw.githubusercontent.com/lesterli/blockchain/master/images/rust/strings_rust_c.jpg https://raw.githubusercontent.com/lesterli/blockchain/master...
- whytevuhuni 3y agoThis is missing a few useful ones, like Box<str>, Arc<str>, Cow<'a, str>, SmallVec<u8>, transmuted newtype references like &UserId, and of course the string type you implemented yourself because the previous ones were not good enough.
- andrepd 3y agoYeah, if std::string vs std::string_view is "a major hurdle"... I don't know what so say
- ziddoap 3y agoWhere did you see "a major hurdle" written?
- Capricorn2481 3y agoYou are doing exactly what is being criticized in the Rust community. Bad faith reads of someone who spent significant time getting into the language.