The CVE database shows how easy it is to use correctly, bah.
Re:The cost of forsaking C
by MaulingMonkey on Thursday October 06, 2016 @11:59AM
(#12653526)
Warts like no guaranteed NUL termination for strncpy and strncat if the buffer length is reached are especially fun to contend with in code reviews.
As is *cat being O(N) with respect to destination length.
So easy that there's been constant flamewars over nonstandard alternatives such as strlcpy, strcpy_s... https://news.ycombinator.com/item?id=6940368
Re:The cost of forsaking C
by atilaneves on Thursday October 06, 2016 @12:27PM
(#12653765)
I actually can't picture a universe in which there'd be a clear win manipulating strings in C. If you believe that and have done string manipulation in other languages, then you're a very different person from me and nothing I can say or do will change your mind. We'll have to agree to disagree.
Throw in the level of control with sprintf() and there's a pretty clear win.
What is easier with C++ ( and most scripting languages ) are things like combinators and regexp.