Bjarne Stroustrup: Why the Programming Language C Is Obsolete
New videos DAILY:
Join Big Think Edge for exclusive videos:
C should have been integrated as a subset of C++, says Stroustrup.

Bjarne Stroustrup is a computer programmer most famous for having designed and implemented the computer programming language C++, one of the most widely used programming languages in the world. His book “The C++ Programming Language” is the most widely read book of its kind and has been translated into at least 19 languages. In addition to his five books, Stroustrup has published hundreds of academic and popular papers. He currently holds the College of Engineering Chair in Computer Science at Texas A&M University.

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

Bjarne Stroustrup: Why the Programming Language C Is Obsolete | Big Think
#Bjarne #Stroustrup #Programming #Language #Obsolete #Big

39 thoughts on “Bjarne Stroustrup: Why the Programming Language C Is Obsolete | Big Think”
  1. As an electronics engineer I say C is still the highest level language that is common in a vast field of technology. No way we like to use classes or cout/cin for controlling a small MicroController. As far as a flowchart can be implemented in C we are happy to use it.

  2. C++ is a superset of C, you can write C code in C++ but it is deprecated (meaning that it is not really allowed by the compiler and frowned upon).

  3. Has he ever actually programmed in C? His explanation of how to get a specific matrix element is demonstrably wrong. It really isn't difficult.

  4. Who cares about Linus T? He's irrelevant. This is about languages, not OS, and as far as I am concerned, when it comes to C/C++ – Bjarne knows what he's talking about and Linus does not.

  5. If C was exactly a subset of C++, nobody would use it.
    I guess C can be used as a lab for things that are still in discussion for C++. 'long long' type still doesn't exists for C++, it is only accepted/compiled. Neither 4-bits system embedded C++.

  6. Oh please! We all KNOW c++ is a superset of c Whoopi do … c++ is grotti it messes with namespaces and yes Linus clearly does not appreciate your efforts Bjarne… there is a reason for this … it's a shame PASCAL isn't the choice for developers

  7. I liked old C++ a lot. But much of the standard library is crap or at least sub-optimal for many applications. C++ lives on being fast. But stuff like std::shared_ptr is just a crappy implementation. To be clear I love reference counting but not with std::shared_ptr. Better to write your own. Another example is std::string. In a lot of cases a COW string is just overall better but now everyone just blindly uses std::string.

  8. this dude is so out of touch with reality its insane. somehow with every new version of c++ he manages to make it even more complicated/slower while at the same time fundamental flaws are left unsolved. to this day there's no function in the standard library to split a string into an array of strings based on a delimeter character. how insane is that. but hey guys, we have this cool new thing called exceptions and RAII. also, fuck performance…

  9. What if I don't want 10000 layers of abstractions? And it is not true that C cannot provide abstractions. You have whole books written on how to do OOP in C

    He talks about how experts in their field don't want to get down into the gritty details of C. Well, guess what – they don't want that with C++ either. LOL There is a reason why languages such as Python thrive. As a chemist what would you really go for – a language that comes close to English (Python) or something that puts several lines of template crap on the screen in front of you. Come on now, let's be real about it.

    I am grateful that C remains and hopefully will remain independent from C++. As a language C shines with its simplicity (among others). C++ has its place under the sun, no doubt about that. But it should not be viewed as a replacement for C.

  10. While there are improvements C++ has over C, he is absolutely wrong that C is obsolete. The biggest flaw in his argument is his first statement, where he says C has the mechanisms for expressing computations but not abstractions. And that is exactly what is wrong with modern software. If you watch Mike Acton's talk at CppCon, he brilliantly outlines that the only thing a computer can reason about is data transforms. When you start adding abstractions into the equation, you get in the way of the only thing that the computer cares about – the data. Computer programming is not about solving abstract problems, but data transform problems, and that is what Bjarne Stroustrup and much of the computer science field gets wrong when it comes to software.

  11. Oh yes, because experts in the field really just get to do the science and ignore the C++ programming language. Not. Whenever I use C++ I spend more than half my time thinking about C++ and the vast bulk of crap that comes with it.

Leave a Reply

Your email address will not be published. Required fields are marked *