> C has library based safe constructs as well, and C++ still has all of C unsafety.
The problem C's lacking one of most important primitives - data structures.
Bugs in standard library happen pretty rarely, I guess. So, C++ users have most common data structures for free.
And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of SIGSEGV fame). I know, there are tons of libraries that offer them, but in my experience of "hey, that server crashed, could you figure out what went wrong"-type tasks, they're very rarely used.
> And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of SIGSEGV fame). I know, there are tons of libraries that offer them, but in my experience of "hey, that server crashed, could you figure out what went wrong"-type tasks, they're very rarely used.
Fortunately, C++ developers just always use the STL because it is considered the bastion of all that is good in collection classes:
Don't get me wrong. I love C++ and use the STL by default, but it's all too rare that I look at a decent sized C++ project and see anything different from what you'd expect if the project were written in C.
The problem C's lacking one of most important primitives - data structures.
Bugs in standard library happen pretty rarely, I guess. So, C++ users have most common data structures for free.
And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of SIGSEGV fame). I know, there are tons of libraries that offer them, but in my experience of "hey, that server crashed, could you figure out what went wrong"-type tasks, they're very rarely used.