Why the Programming Language C Is Obsolete

Question: What is the difference between C and C++?
Bjarne Stroustrup:  C has the basic mechanisms for expressing computations.  It has iterations, it has data types, it has functions and that’s it.  It doesn’t get into the game of expressing abstractions.  So if I want a matrix in C, I would have to say, I want an array and then I want a whole bunch of arrays and when I want to get the third element I have to program my way down to the third element of the fourth row or something like that.  

In C++ you can define something, call it a matrix, you define a subscript operator. If you don’t want rectangular matrixes you can get pentadiagonal matrices, triangular matrices that’s the kind of stuff that people... the expert in that field are interested in.  And you build that set of concepts and then you program it directly.  It’s easier to program, it’s easier to debug and sometimes it’s even easier to optimize for performance when you are expressing the notions at the higher level, at the level where an expert in the field operates, rather than trying to have the expert in the field, say the physicist, also be an expert in dealing with the hardware, with the computer.  There are fields still where you have to have a physicist and a computer scientist to get the work done, but we would like to minimize those because the skill sets are not the same.  So you want to lift from the hardware towards the human level.  

Question:
Is C obsolete?

Bjarne Stroustrup: This is somewhat controversial.  I think it is obsolete.  I think the languages should have been merged into one, so that C would have been a subset of C++ instead of nearly a subset of C++. And then people could have used whatever parts of the C++ tool set they needed.  As it is now, there are still enough incompatibilities that you have to remember which language you’re writing in, and I don’t think that is necessary.  It appears to be a historical necessity, but it is not a technical necessity.  

I’ve argued for compatibility, very strong compatibility, all the time.  I mean, I started working on C++ three doors down from Dennis Ritchie and we were talking every day.  The competition and tension that has been between C and C++ over the decades certainly didn’t come from home.  

Dennis Ritchie wrote that first book that Brian Carnahan, now I’ll have dinner with Brian next week.  We’re still very good friends as we’ve always been, but sometimes the programmers of the languages don’t quite see it that way.  It should have been one language.

Recorded August 12, 2010

Interviewed by Max Miller

C should have been integrated as a subset of C++, says Stroustrup.

The tech shift: Push politicians for answers, and develop your digital literacy

Tech is rising and America's middle class is vanishing. Here's what to do.

Videos
  • The rise of new technologies is making the United States more economically unequal, says Professor Ramesh Srinivasan. Americans should be pushing the current presidential candidates hard for answers on how they will bring economic security and how they will ensure that technological transitions benefit all of us.
  • "We are at an inflection point when it comes to top-down control over very many different aspects of our lives through privatized corporate power over technology," says Srinivasan. Now is the time to debate solutions like basic income and worker-owned cooperatives.
  • Concurrently, individuals should develop digital literacy and get educated on the potential solutions. Srinivasan recommends taking free online and open courses from universities like Stanford and MIT, and reading books and quality journalism on these issues.
Keep reading Show less

This 103-year-old philosopher's to-do list will get you through self-isolation

Need to isolate? No problem! This philosopher is keeping the world posted on his isolation routine by Facebook.

Screenshot from this YouTube video: https://www.youtube.com/watch?v=A79oPGfiWNI&app=desktop / UN FILM DE LUIZA ȘORA
Personal Growth
  • Like everybody else, Romanian philosopher Mihai Sora is stuck inside.
  • He is keeping busy for a 103-year-old man, and keeping the world up to date on his indoor adventures with Facebook.
  • His to-do list is impressive, but not so impressive it can't be used by most people.
Keep reading Show less

10 things you did as a kid that you should start doing again

Playing and being creative shouldn't stop when you grow up.

Gear
  • Growing up doesn't mean your life has to be all about work.
  • Studies have shown that playing and being creative has numerous health benefits for adults of all ages.
  • Simple exercises like drawing, finishing a puzzle, or taking breaks outdoors can have a positive impact on your life.

Keep reading Show less