Why do people and companies use more C++ than C?

Need help with C, C++, perl, python, etc?

Re: Why do people and companies use more C++ than C?

Postby larienna » 2019-05-27 02:54

I am still surprised that C++ is still the dominant language. From my point of view, I think the reason why people still use C++ is because it's object oriented and a lot of C++ code has already been made so far, so it requires maintenance. I think that C# will eventually replace C++ because at least it has a garbage collector which makes OOP less a pain.

I followed a few years ago a new class of plain C and I fall in love again with the language. All my hatred of C was in fact due to C++. Yes it is a more dangerous language because you have complete control on the the system. And you need such control for writing low level code (Drivers, OS, etc). Doing the same in C++ is possible but very risky.

An interesting quote that I found on the net was that: "C++ makes it harder to shoot yourself in the foot than with C, but when you do shoot yourself in the foot with C++, it's the whole leg that blows up"
larienna
 
Posts: 59
Joined: 2014-09-27 20:54

Re: Why do people and companies use more C++ than C?

Postby giaur » 2019-07-15 19:23

Wrong question. For some tasks C performs better, C++ is reasonable for other tasks. It depends

Btw, C# will never replace C++, the same as motorcyles will never replace cars - both are used for different tasks.
giaur
 
Posts: 120
Joined: 2013-03-08 07:03

Re: Why do people and companies use more C++ than C?

Postby DebbyIan » 2020-01-16 19:16

C has fewer concepts but is harder to use "correctly".


C++ is more strongly typed and as such it's less susceptible to mistakes being carried forwards of the compilation process. Never underestimate the level of type specificity in a language, especially when it comes to C or C++.


If you're going to learn to use C properly you'll end up using it in a C++ style.
DebbyIan
 
Posts: 143
Joined: 2013-05-09 12:12

Previous

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

fashionable