3 ms·
> 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.
by drdaeman 13y ago
> 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.
- deleted 13y ago[deleted]
- cbsmith 13y ago> 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: http://www.codeofhonor.com/blog/avoiding-game-crashes-related-to-linked-lists http://www.codeofhonor.com/blog/avoiding-game-crashes-relate... http://engineering.adap.tv/2012/03/29/why-we-use-c-without-using-stl-or-boost/ http://engineering.adap.tv/2012/03/29/why-we-use-c-without-u... 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.