Strings and UTF-8

I think it’s also worth mentioning that “the std::basic_string thing” is, in my experience, one of the biggest practical contributors to the infamous C++ template error message soup. Rust obviously has a bunch of other things mitigating that problem, but similar generics-related error explosions still exist, so I’m generally not a fan of generic types where one instantiation is expected to solve the vast majority of use cases on its own.

A generic string as a completely separate type from the standard string would be totally fine though, if it turns out that’s more helpful than multiple concrete types for the people that need non-UTF-8 strings.

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.