Why the Programming Language C Is Obsolete
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
C should have been integrated as a subset of C++, says Stroustrup.
To create wiser adults, add empathy to the school curriculum.
- Stories are at the heart of learning, writes Cleary Vaughan-Lee, Executive Director for the Global Oneness Project. They have always challenged us to think beyond ourselves, expanding our experience and revealing deep truths.
- Vaughan-Lee explains 6 ways that storytelling can foster empathy and deliver powerful learning experiences.
- Global Oneness Project is a free library of stories—containing short documentaries, photo essays, and essays—that each contain a companion lesson plan and learning activities for students so they can expand their experience of the world.
The inequalities impact everything from education to health.
Astrophysicist Michelle Thaller talks ISS and why NICER is so important.
- Being outside of Earth's atmosphere while also being able to look down on the planet is both a challenge and a unique benefit for astronauts conducting important and innovative experiments aboard the International Space Station.
- NASA astrophysicist Michelle Thaller explains why one such project, known as NICER (Neutron star Interior Composition Explorer), is "one of the most amazing discoveries of the last year."
- Researchers used x-ray light data from NICER to map the surface of neutrons (the spinning remnants of dead stars 10-50 times the mass of our sun). Thaller explains how this data can be used to create a clock more accurate than any on Earth, as well as a GPS device that can be used anywhere in the galaxy.
Philosophers like to present their works as if everything before it was wrong. Sometimes, they even say they have ended the need for more philosophy. So, what happens when somebody realizes they were mistaken?
Sometimes philosophers are wrong and admitting that you could be wrong is a big part of being a real philosopher. While most philosophers make minor adjustments to their arguments to correct for mistakes, others make large shifts in their thinking. Here, we have four philosophers who went back on what they said earlier in often radical ways.
Just before I turned 60, I discovered that sharing my story by drawing could be an effective way to both alleviate my symptoms and combat that stigma.
I've lived much of my life with anxiety and depression, including the negative feelings – shame and self-doubt – that seduced me into believing the stigma around mental illness: that people knew I wasn't good enough; that they would avoid me because I was different or unstable; and that I had to find a way to make them like me.