- Aug 26th. 2013
- By truth
I am sure that many of us have had this discussion with someone, at some point, somwhere. Why is C still around? Straight off the bat, I’m going to show my colors: C rocks. And so do other languages. It’s true, other languages which happen to be very readable, quite forgiving and incorporation features which aid the developer (garbage collection, boundary checking, implicit references, dictionaries,…), and in many cases perform very well. As a C guy, I’m the first who used to resort to performance as an argument to dismiss other languages as inferior. But the bottomline is that isn’t necessarily true. Don’t get me wrong: good C code – yay, we can also embed assembler, a good compiler, etc. 9/10 times will yield superior results – so the performance argument is still often valid. However that doesn’t equate to all other languages being slow. Furthermore, not all applications require fine-graining the code for supereme performance. One language that has come a long way since its earlier days is Java, particularly in what refers to performance. Java used to be slow. Very slow. It always had it’s good things though: C style syntax, object oriented, garbage collection, supposedly portable to any platform with a JVM… But that JVM the code ran on, and JIT’d on. Oh, it was slow. But it has come a long way, and now in certain operations such as arithmetic ops, it’s pretty much just as fast as unoptimized C. I mean in many cases that argument is not valid anymore. Same goes for python. Man, some people dismiss python arguing it’s an interpreted language and therefore slow. First of all, implementations are compiled or interpreted. The language is a language. Secondly, and most important: not strictly true. Python can generate bytecode and run on the python VM (just read more on pypy or cpython). Other languages, functional languages for instance, aid in defining very elegant solutions in certain contexts. I’ve heard people say Haskell’s more widespread implementation, ghc, isn’t particularly fast, but I’ve also read otherwise…. My point is there’s very stiff competition, but C hasn’t gone anywhere. C is still around, and will continue to be around. Lets try to understand why.