4 ms·
This was a mistake. Having str and StrBuf would have been significantly less confusing than str and String.
by howinteresting 4y ago
This was a mistake. Having str and StrBuf would have been significantly less confusing than str and String.
- steveklabnik 4y agoI often joke that this is the only change I'd desire for a Rust 2.0.
- OJFord 4y agoWhat about aliasing it, marking String as deprecated in docs, 'please use StrBuf'? (Clippy warning, etc.)
- steveklabnik 4y agoIn theory you could do something like this, but it would be a lot of churn for a questionable amount of gain. I probably wouldn't support it today; Rust is past being able to make these sorts of changes imho.
- howinteresting 4y agoCould it be done as part of a new edition, with cargo fix to support it?
- steveklabnik 4y agoStandard library can't vary per edition, generally speaking. Maybe there'd be a way to get around it in this case, I haven't thought much about it, honestly.