Why is C still that more popular than C++!?

Hello all,

Please look at this page: https://www.tiobe.com/tiobe-index/
Based on that major website C has been much more used and popular than C++ reaching the top programming language during recent two decades! I though C was old and not updated. Stroustrup said that C is obsolete! C++ is updated regularly and has inheritence, class and much more in comparison to C but C++ is just going down and C going up!!

Why, please!?
I'm shocked and think I should have learnt C from the first place instead of C++
Last edited on
C is everywhere, in everything. It is the lingua franca. It is in your phone, in your microwave; it is in door handles, it is in wristwatches. It is in car fuel pumps, it is in hi-tech shoes. 27 billion micro-controllers were shipped last year; the base, lowest-common denominator language for programming such things is C.
Last edited on
frek wrote:
Based on that major website C has been much more used
tiobe measures noise, not use.
frek wrote:
I though C was old and not updated.
The most recent update to C came out in early 2018, although that update was indeed minor. The C standards committee is hard at work on the next, major, revision (codename "C2x") which already includes a lot of changes in the current draft.

And yes, Repeater is also correct.
Last edited on
Thank you both. So can we reach the result this way that C is better for embedded programming whilst C++ is better for higher level programming like apps for desktop and mobile platforms?

If yes, why can't C++ do the same performance as C in embedded programming then? I thought it had everything C has (plus more things)! :(

Last edited on
If yes, why can't C++ do the same performance as C in embedded programming then? I thought it had everything C has!

It really has nothing to do with "performance" . Yes C++ has everything C has, and more, the problem is that "more". Creating a C compiler is much easier than creating a C++ compiler and the C compiler will usually require fewer resources. Remember that many embedded systems are space restrained, sometimes less than 100 bytes of ram, and program memory (ROM) can also be severely limited as well.

jlb Very well put.

Of course, as C evolves, it's making the compiler fatter, mostly unnecessarily.
Last edited on
If you know C++ (including pointers, arrays, and raw data only structs), you can learn and use C in moments. C++ compilers let you make hybrid C and C++ programs easily. So you can use C or C-code that you found online or had from legacy projects etc easily, and use C++ for new code or where it makes sense, and swap between the two as much as you want all day long. So knowing C++ is actually better, because the raw low level syntax is virtually identical and C is a small, easy to pick up language.

Going in reverse is painful. if you only know C, and want to write some c++ OOP code into your project, learning the c++ is going to take months and is quite challenging, and the modern style and way of doing things correctly is going to take a while to get going. Of course you can compile c++ into C easily as above, but getting that working will be harder for the C only coder than for the C++ coder pulling C in. Its not just syntax and such, you are going from low level to high level language and the parameters a C++ code block needs may require you to write a C++ block that has C input and returns C++ usable formatted objects, adding some effort and knowledge to make it work.

Basically, I am saying that going to C or using C as a C++ coder is a LOT easier than the reverse, and if you learned C++ first, you are in a good place, whichever language you decide to use.


When I learned C++ it was not uncommon to mashup the languages. Ive written c++ that used malloc/free to get access to realloc (before vectors existed). Ive always used C strings because c++ strings did not exist in a usable format when I learned the language. Ive used file* instead of C++ on systems where it performed better (never did really get WHY). Most of that is old info from long, long ago, just a mention of how it once was. No one would bat an eye at a C macro or other C language mixed into the C++ back then, it was not unusual at all. And the compilers still support this, but it is frowned upon now.
Last edited on
Thanks so much for that great explanation and info.
I'm also sure as a C++ dev almost any other language is easy to grasp and make progress quickly! :)

One side question, I also like to use C++ for mobile apps using a library like QtQuick. But apparently the Qt company doesn't care enough about mobile apps and I need to switch to Flutter for this aim and for which I must learn the Dart language too. :|

Topic archived. No new replies allowed.