3 ms·
C, like thousands of other computer science students, was the first language I learnt. I have always felt that a language is only as popular as the niche it se
by sharmajai 15y ago
C, like thousands of other computer science students, was the first language I learnt.
I have always felt that a language is only as popular as the niche it serves. For C that niche started out as OS implementation and expanded into driver programming, UI programming, embedded systems programming, graphics programming, and many many more disciplines.
There was Fortran and PL/1 before C, what made C so popular? I will let dmr's friend Brian Kernighan answer it:
C is perhaps the best balance of expressiveness and efficiency that has ever been seen in programming languages. At the time it was developed, efficiency mattered a great deal: machines were slow and had small memories, so one had to get close to the efficiency of assembler. C did this for system programming tasks--writing compilers, operating systems and tools. It was so close to the machine that you could see what the code would be (and it wasn't hard to write a good compiler), but it still was safely above the instruction level and a good enough match to all machines that one didn't think about specific tricks for specific machines. Once C came along, there no longer was any reason for any normal programmer to use assembly language. It's still my favorite language; if I were marooned on a desert island with only one compiler, it would have to be for C.[1]
If I have to pick one reason for C's popularity, it would be pointers (both function and data) alongwith type casting. IMHO this was the combination that not only gave you full control of the underlying hardware (other languages had done that too) but most importantly it enabled other programming paradigms, (functional, object oriented etc.), while doing that.
Thanks for introducing us to the wonderful world of computer programming. RIP DMR.
1. http://www.linuxjournal.com/article/7035 http://www.linuxjournal.com/article/7035