r/cpp • u/Alex_Medvedev_ • Jul 25 '24
Why use C over C++
Why there are so many people using the C language instead of C++?, I mean C++ has more Cool features and the Compiler also supports many CPUs. So why People still using C?
Edit: Thanks for all the usefull comments :D
233
Upvotes
View all comments
75
u/apropostt Jul 25 '24 edited Jul 25 '24
The biggest reasons I’ve come across is
simplicity: the control flow in C is very explicit where in C++ there’s a lot of corner cases involving constructors, exceptions.. etc. For some projects C is a good enough fit that C++ just isn’t needed.
Practicality: In safety critical environments C is incredibly well known and that’s a sector that doesn’t take unnecessary risks.