4 ms·
> I agree, but C (the language) doesn't even have the concept of a 'string' It has string literals, so yes it does. > The C++ std::string type is neither intu
by atilaneves 7y ago
> I agree, but C (the language) doesn't even have the concept of a 'string'
It has string literals, so yes it does.
> The C++ std::string type is neither intuitive to work with
Many would disagree.
> nor does it allow to write high-performance code
True, but only due to backwards compatibility with C - std::string operations have to add a null terminator for no other good reason.
- badsectoracula 7y ago> Many would disagree. Many would also agree, that means nothing. Personally i dislike C++'s strings... and the rest of STL, which i view as one of the worst standard library APIs in wide use.
- jstimpfle 7y ago> True, but only due to backwards compatibility with C - std::string operations have to add a null terminator for no other good reason. That's about the least reason why std::string is inefficient.