|
c is not used because old programmers refuse to change.
c is much more portable than c++ (have you ever tried switching to a different compiler that uses a different stl implementation? it's not fun). c can be run on systems with no dynamic memory allocation (no malloc, no 'new'), which is often the case in embedded systems.
the truth is that c++ and object oriented programming make designing large programs easy and make coding convenient. they also have a tendency to encourage large memory useage and sacrifice performance for abstraction. virtual function calls are unacceptably slow when performance is critical. multiple inheritance ends up with classes that have unused (hidden) data fields that are a waste of memory. copy constructors, autopointers, implicit function calls (such as destructor functions), and implicit pointer indirection ('this'), all contribute to this and are things you do not what when you need tight control of your code. when you don't care about convenience, but performance and memory footprint are what matters, c is the only way to go.
some things that are written in c:
windows kernel and the win32 layer, linux kernel and most linux/unix applications (from 'apache' to 'Xfree86'), any bsd, solaris, aix, hpux, tru64, qnx, most other os's, most drivers, oracle, db2, sybase, ...
|