CodingInLondon
2d
C: how do we store a string? let’s use a char*, it’s efficient. “But it’s dangerous! What it is passed around and outlives the original string?” C++98: let’s use a std::string instead. “But it’s expensive to copy and return” C++11: move semantics. “But it’s not backwards compatible with char * without a copy!” C++17: std::string_view “But it’s dangerous! What it is passed around and outlives the original string?”