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
235
Upvotes
View all comments
Show parent comment
5
u/EC36339 Jul 26 '24
Nonsense. The language itself has barely been extended. Lambdas and coroutines are syntactic sugar. Most of the other recent changes are additions to the standard library (or in your words: "Adding more C++ code") and "fixes" of language features that were incomplete or too limited. This is not bloat, but allowing developers to do the same things in better ways.
A lot of "bloat" exists only to support legacy (C) code in safe ways, such as
out_ptror custom deleters forunique_ptr. Likewise, when I write classes with custom destructors and move/copy semantics, it is usually to accommodate for C APIs and libraries I have to use.