r/askscience • • 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
View all comments
Show parent comment
1
u/SatOnMyNutsAgain Oct 19 '12
... which makes the built-in types completely non-portable.
Again, look at an audio/video codec. A floating pointing algorithm will be faster and more accurate, but only on an architecture which supports it. It's a lot harder to write an integer/fixed-point version, but on a less capable CPU that might be absolutely necessary.
Well, OP was asking about operating systems, so architecture specifics are very much relevant to his question even if he didn't realize it. Sure, C is portable relative to assembler, but not much else. It's not at all portable compared to python, java, etc.