News for hackers. Stuff that matters.
Re:Changing the Rules of Rust by kukkamario on Sunday September 17, 2023 @04:53PM (#37549197)
Large part of why standard was changed so that GCC's copy-on-write strings became non-standard compliant was because CoW made std::string_view and such extremely hazardous. CoW has its benefits but also huge downsides, and small-string optimisation makes lot more sense with the C++11 move semantics.
Re:Changing the Rules of Rust by tialaramex on Sunday September 17, 2023 @07:41PM (#37550496)
For many people SSO would be a waste of time except you need to store the empty string.

There are people who make a lot of very short strings and need them to go fast, but not so many to justify making that a core language feature, if not for the fact that C++ empty string needs a zero byte for C compatibility.

That's why Rust got away without it, their empty string has length zero.