My question is this, why do people still use C when they have C++? I've studied C because it is considered the language on which programmers communicate and is recommended for any programmer to know. I've then passed to C++ and I now think, why do people still use and program in C? As far as I see, C++ is more powerful (has OOP aspects in it), it is as fast as C and overall just seems to be better. I've seen people dislike C++ because it is too hard to code in.
Asked
Active
Viewed 4,572 times
5
-
9[Ask Linus](http://thread.gmane.org/gmane.comp.version-control.git/57643/focus=57918) yet? ;) – Björn Pollex Mar 11 '11 at 09:22
-
1possible duplicate of [Why artificially limit your code to C?](http://stackoverflow.com/questions/649789/why-artificially-limit-your-code-to-c) – sharptooth Mar 11 '11 at 09:23
-
1other possible duplicate: http://stackoverflow.com/questions/497786/why-would-anybody-use-c-over-c – AProgrammer Mar 11 '11 at 09:23
-
@sharptooth: Ah, this makes me miss him. – Björn Pollex Mar 11 '11 at 09:25
-
8Because C is awesome, and C++ is not. – Matt Joiner Mar 11 '11 at 09:27
-
Why people use either in 2013 is beyond me... It can only be explained via saddism. – weberc2 Mar 14 '13 at 20:38
2 Answers
13
C is much simpler, and more fun to program in.
But what's more, the compiler is much much easier to write so there are still lots of environments where you can either only get a C compiler or the C++ compiler is far inferior (buggy, slower, generates bloated binaries).

Makis
- 12,468
- 10
- 62
- 71
-
11
-
5+1 for the point about the compilers. People who've only used the big, mature compilers like MSVC and GCC don't realise what the long-tail of crappy embedded toolchains looks like - a vendor who can barely manage a C compiler in 2010 is not going to be somebody you'd want to go to for a C++ compiler. – Will Dean Mar 11 '11 at 09:25
-
@sharptooth: of course it was subjective, but then again it's a valid reason in my opinion. – Makis Mar 11 '11 at 21:48
6
C is often used for hardware programming, some microcontrollers and similar hardware often have a compiler which turns C code into native instructions for it. It makes programming those pieces of hardware much simpler than writing raw assembly.

Argote
- 2,155
- 1
- 15
- 20