3 ms·
Why does string need/deserve to be in the standard? Doesn't the existence of cord cast doubt on thst?
by gowld 8y ago
Why does string need/deserve to be in the standard? Doesn't the existence of cord cast doubt on thst?
- favorited 8y agostring is a common-currency type. I don't want to be converting between char* and vector<char> and custom::unicode_string, etc. because each API or library has their own slightly specialized version. (anymore than we already do, anyway) Most of the time, std::string is fine, so I expect there to be APIs exchanging string data using std::string. Rope/cord is a domain-specific data structure. If I was building software which was constantly modifying ranges of text, then rope might be a good choice.
- cmrdporcupine 8y agoBack in the dark ages of 1990s C++, it seemed liked every single project had its own custom string class. Things coalescing around std::string, as imperfect as it is, is a huge relief.