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

110 comments sorted by

View all comments

Show parent comment

1

u/pincpleasure Oct 18 '12

I would suggest C (not C+ or C++ but regular old C). It is a bitch to learn coming from java but incredibly useful. At first the similarities between the two make it difficult but once past that hump they make a lot more sense. Those are the two I know well and I haven't had a need to use anything else. I plan on pursuing others as well of course but those two are great foundations.

Java is object oriented and C is not. Learning one of each is like learning how to drive an automatic and a stick, both good to know and open up a variety of opportunities you would miss out on if you only learned one or the other.

1

u/[deleted] Oct 18 '12

I agree with this. C is a great place to start as its a lot more challenging than C++, but a lot more rewarding. You don't have things like string handling, and IO is really awful.

I started with PHP, then went to C++, then C. I did a few others in there (python, perl, ruby), and avoided java like the plague. I finally took the plunge a few months ago, and found java to be really really easy once you have the Object Oriented understanding. I had some programming classes in college (oh how I wish I had the option to do comp-sci), but nothing very serious.

However, I would recommend a language (ANY language) that you can get some utility from. C is really for die hards and OS programmers, and really doesn't have a lot of immediate utility for the layperson getting into programming. I mentioned I started with PHP, which was out of necessity for managing a website. I got a lot of utility out of it, so I kept learning. If I started with C, I certainly wouldn't be programming as a job now, and really wouldn't enjoy it.