Discussion about this post

User's avatar
Marc Rochkind's avatar

Yup. I first noticed this problem in 1973. C should always be the last choice, to be used only when it is the best choice.

Expand full comment
Jodie's avatar

C strings are and always have been, hot garbage, and std::string does not really address the fundamental issue.

Not only are they are common source of bugs or attacks, they are also inefficient: is it VERY common in C programs to use strlen(), over and over resulting in needless O(N) complexity.

Pascal got this right by using the first character in the array as the length.

Expand full comment
7 more comments...

No posts