Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What type of programs are best written in C [closed]

Tags:

c

Code where you need absolute control over memory management. Code where you need to be utterly in control of speed versus memory trade-offs. Very low-level file manipulation (such as access to the raw devices).

Examples include OS kernel, and embedded apps.

In the late 1980s, I was head of the maintenance team on a C system that was more than a million lines of code. It did database access (Oracle), X Windows graphics, interprocess communications, all sorts of good stuff. It ran on VMS and several varieties of Unix. But if I were to recreate that system today, I sure wouldn't use C, I'd use Java. Others would probably use C#.


Low level functions such as OS kernel and drivers. For those, C is unbeatable.


You can use C to write anything. It is a very general purpose language. After doing so for a little while you will understand why there are other "higher level" languages available.

"Learn C", by all means, but don't don't stick with it for too long. Other languages are far more productive.

I think the gist of the people who say you need to learn C is so that you understand the relationship between high level code and the machine internals and what exaclty happens with bits, bytes, program execution, etc.

Learn that, and then move on.


Those 100 lines of python code that were accounting for 80% of your execution time.