Generally, the good reasons you'll see for using C are lack of C++ compiler availability and embedded programming. The bad reasons tend to be variations of developer inertia and the inability to decide which features of C++ ought to be used -- arguing against the STL isn't a good argument against C++ as a whole.
On Linux/Mac you have g++ and on Windows you have MinGW/Visual Studio
Why do we use C still?
11–20 of 22 posts
Re: Why do we use C still?
#12Re: Why do we use C still?
#13because C is perfection
Re: Why do we use C still?
#14Re: Why do we use C still?
#15Earlier quoted context omitted.
One reason would be the massive existing codebases written in C (Linux kernel, anyone?)...
We should all switch to Java/C#. It makes programming much much faster and easier. http://techiest.blogspot.com/ .
Re: Why do we use C still?
#161. Everyone has a C compiler, or can write a decent-enough one to support their preferred environment.
2. C is well tested and specified. Reading the standard isn't an exercise is face melting (compare with, say, C++).
3. As a systems language, C doesn't require a runtime library if not needed, and this can be left out very easily (not the case with Go, D, or C++, as I'm aware).
4. C exposes easy trapdoors to the underlying machine (inline assembly, pointers, etc.) that are very handy.
5. C is usable by other languages, as its calling conventions are well documented. This is why C is a preferred base language for things like OpenGL bindings--it's easy to write Ruby, Pyhton, Java, etc. wrappers. This is in sharp contrast to C++, which is brainfucked for things like symbol exports.
6. A line of C is pretty obvious in what it does, when written correctly. You can usually estimate what code it'll generate, barring #define hackery. C++ especially is bad at this.
~
C is still used because it doesn't do a lot, and it nails what it does do.
Re: Why do we use C still?
#17Re: Why do we use C still?
#18The only way to do elegant programming is with C. C is as perfect as programming languages can get. The other languages that you named are just more flawed than C. That's why.
Re: Why do we use C still?
#19Re: Why do we use C still?
#20C has disadvantages. But many of them are the result of its advantages. Automated garbage collection is great, but garbage collection by hand tuning code gets stuff that AGC may miss.
That said, I'm interested in picking up some of the other languages mentioned.