Comment by ricardo81
2 years ago
As a user posting from a Linux machine, I disagree. Though it seems the "don't use C" crowd often delegate the important decisions to somewheres else.
I guess the answer is "some people's C is good enough, but not yours"
If the problem is "you're using nul-terminated strings" as the GP said, then "don't use C" a good step towards fixing that problem, no?
Perhaps, but also realistic to accept that you're using code where other people do/have and that the same logic would apply to them.
You only have to care about it at boundaries though, for the most part. Like, when calling a C API. That's easy to handle. Even C++'s std::string can do that, as the c_str method always returns a null-terminated string. That inherently kills the need for things like strcat.
8 replies →