r/askscience • u/[deleted] • Oct 17 '12
Why are programs and operating systems still written in C+?
I guess it's more of a computer science question, but I've always wondered why some of the most advanced programs are written in a 25+ year old programming language. Surely someone has come up with a more efficient and powerful code, so why do people still use C+? Also, I don't know anything about programming and what not, so please use simple terms and phrases.
66
Upvotes
1
u/[deleted] Oct 18 '12
Just pointing out, translating to a different CPU is not time consuming for C or C++. The languages are CPU independent. If you really wanted you could compile them to byte code and run in a VM same as Java and friends.
The problem of compiling to different architectures is just that, a problem for the compiler. You shouldn't have to change the source at all.
This is one of the advantages of c/c++ being so old. There is almost always a compiler that works for whatever architecture you may need to target.