<story><title>Format Strings in Rust 1.58</title><url>https://www.rustnote.com/blog/format_strings.html</url></story><parent_chain><item><author>megumax</author><text>It&amp;#x27;s a nice Quality of Life addition, that I would like to see with C++ as well.&lt;p&gt;I wish they don&amp;#x27;t implement f-strings and s-strings, at least for now. Even if they are more ergonomic than the `format!` and `String::from`, they hide a memory allocation which is not really indicated in a language like Rust and would be really weird in a context without an allocator. The only solution to this would be `const` evaluation of this, but that would restrict their use to `const` environments, so mostly unusable.</text></item></parent_chain><comment><author>kibwen</author><text>As a person involved in this space, if there&amp;#x27;s ever an RFC for full-on f-strings there&amp;#x27;s a good chance that I&amp;#x27;d be the one who writes it, and I can tell you for certain that I would not make `f&amp;quot;foo&amp;quot;` incur an allocation; it would return a std::fmt::Arguments rather than a String.</text></comment>
<story><title>Format Strings in Rust 1.58</title><url>https://www.rustnote.com/blog/format_strings.html</url></story><parent_chain><item><author>megumax</author><text>It&amp;#x27;s a nice Quality of Life addition, that I would like to see with C++ as well.&lt;p&gt;I wish they don&amp;#x27;t implement f-strings and s-strings, at least for now. Even if they are more ergonomic than the `format!` and `String::from`, they hide a memory allocation which is not really indicated in a language like Rust and would be really weird in a context without an allocator. The only solution to this would be `const` evaluation of this, but that would restrict their use to `const` environments, so mostly unusable.</text></item></parent_chain><comment><author>pie_flavor</author><text>I mean, that ship&amp;#x27;s basically sailed. People are too lazy even to take `std::string_view` instead of `std::string&amp;amp;`, trying to avoid pointless allocations and clones with any API but your own is almost a fool&amp;#x27;s errand at this point.</text></comment>