Re:Some Were Meant for C (2017) [pdf]
by badsectoracula on Thursday April 25, 2019 @08:36AM
(#19747378)
> 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.
> 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.
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.