Re:Switching to C over 'Modern' Programming Languages
by flohofwoe on Friday April 14, 2023 @03:29AM
(#35566554)
I don't even know where to start with C++ stdlib string problems, but being mutable and doing a unique heap allocation (above a certain length) are definitely at the top of the list.
std::string_view would have been a good thing if it hadn't added another memory corruption foot gun.
A general string type is one of those things where you can either have convenience or performance, but never both.
std::string_view would have been a good thing if it hadn't added another memory corruption foot gun.
A general string type is one of those things where you can either have convenience or performance, but never both.