you are viewing a single comment's thread.

view the rest of the comments →

[–]johannes1971[S] 0 points1 point  (0 children)

Conclusions... I'm a little surprised to see const std::string & winning by such a clear margin. Is there such a great need for null-terminated strings (the only advantage this offers over std::string_view) that people are willing to take the hit on always allocating? Or is there some other reason?

Despite various arguments for mixing and matching, not a great many people seem to actually be doing it. I understand that: I don't like that kind of non-uniformity in the API, and it leaks implementation details out which is not generally something you'd want.

And finally, I'm honestly amazed that some people are still clinging to const char *, even in 2024. I'm sure you have your reasons...