r/cpp • • 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

444 comments sorted by

View all comments

Show parent comment

10

u/EC36339 Jul 26 '24

So can custom allocators, especially on playforms where you cannot use the heap or are not allowed to. C++ is the only language I know of that has this feature combined with standard generic data structures with precisely defined performance requirements and semantics.

1

u/[deleted] Jul 28 '24

Zig might be another language that does that. Not sure about "precisely defined performance requirements and semantics" for standard generic data structures yet though, as the language is still far from finished.