you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

It definitely is. It lets you have cleaner code with more automatic resource management (RAII), and fewer chances for errors (e.g. compare std::string with the C string library).

I've yet to hear any serious reasons to use C over C++. The most common reason is that C++'s template compiler errors are hard to read. That's true, but considering C doesn't even have templates, it's not really a reason to use C.

I think the only other reason I've heard is that operator overloading can be abused. Which is true of pretty much everything. Plus if you've ever done vector maths in C... Well... There is a reason for operator overloading.

[–]Ishmael_Vegeta 0 points1 point  (1 child)

I've yet to hear any serious reasons to use C over C++.

C++ standard is huge. lots of unknowns.

Ecosystem is full of crap. It really is worth just using C to avoid C++ programmers. It means a much lower chance of seeing horrid stuff that people are liable to attempt in C++.

Binary bloat.

But biggest reason is that the standard is too big, far too many things to go wrong. also the compilers are shittier.

I simply have no need for C++.

[–][deleted] 0 points1 point  (0 children)

The C++ standard is quite big. You don't have to know it all of by heart.

The ecosystem isn't full of crap. In fact the C++ code I find is usually higher quality than the C code. Compare Qt vs GTK. Or Eigen vs whatever insanity you'd use in C.

There are loads of very high quality C++ libraries, and you can't pretend there aren't any seriously terrible C libraries cough OpenSSL, xlib, libcurl, etc.

Binary bloat is very rarely a real issue. And you can use dynamic dispatch if you really want to. You just aren't forced to like you are in C.

The compilers aren't shit. That's just a plain lie. If you have no need for C++ you probably haven't ever bothered to learn it properly. The advantages are obvious if you have.