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

preview_player
Показать описание
Bjarne Stroustrup: Why the Programming Language C Is Obsolete
----------------------------------------------------------------------------------
C should have been integrated as a subset of C++, says Stroustrup.
----------------------------------------------------------------------------------
BJARNE 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.
----------------------------------------------------------------------------------
TRANSCRIPT:

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
Рекомендации по теме
Комментарии
Автор

I want a reaction vid of Linus Torvalds watching this

art_sacramento
Автор

Linus Torvalds would lose his shit if he saw this

DreamerTrain
Автор

Tell that to embedded systems programmers.

ZouloumOSX
Автор

I think one point also to consider (in addition to many from the comments below) is that C is a very small language, whereas C++ in its entirety is massive and is only growing increasingly larger with each standard. As a result, writing a C compiler for a new system is far easier, and often that is all that is needed.

ImperialCraftGaming
Автор

In my worthless opinion, C, as well as assembler, are the main languages for embedded processor programming. To write code that actually follows what is going on inside the processor may be more difficult and time consuming, but it is infinitely more rewarding than pushing around program lines that are transparent to the CPU. I don't have a religious affiliation with any particular program language. But C and Assembly make you a better programmer  for higher level languages. When you understand how the CPU recognizes 1s and 0s and how its particular structure converts these bits into information and output control, you can visualize what your lines of code are actually doing. This, for me at least, allows me to have a much better understanding of what each line of code actually means. Therefore I make fewer mistakes and can solve programming problems much faster, no matter what program language I am using.

chuckjls
Автор

Majority of microcontrollers are still coded in C. So whether or not its considered obsolete in the realm of software, it most definitely isnt in general, simply because just about every electronic has firmware or an embedded system with a microcontroller running C on it

kylebutleracoustic
Автор

Me watching this 11 year old video and I'm still using C and Assembly every day, developing firmware drivers/libraries as my full-time job on STM32 and nRF52/53 series. People keep telling me C will die but it's still going strong, since my first C code that i wrote back in 2007. Rust is picking up popularity but still has a long way to go since all compilers and manufacturer support are still mainly for C.

juskim
Автор

I think people commenting on this saying "I still use C today" etc, please understand that Bjarne here is not saying that C++ should have replaced C, or is better in any way. He is saying it is "obsolete" in the sense that the two languages should be one entity, that C and C++ should be fully compatible. I also think the video title is somewhat clickbaity as it is implying he thinks C should no longer be used.

DogeOfWar
Автор

c is still and will always remain on of the best stuctured programming languges ever built I learnt c before c++ and I never regretted it, furthermore there are places where an oop approach just never works

ondari
Автор

of course C is obsolete
because Bjarne Stroustrup is the creator of C++ =D

royc
Автор

I still program in C. Kernel level programming FTW!

AllAmericanJBert
Автор

Though I am a beginner but still C is love of my life.

deepakthakur
Автор

Most of the commenters and dislikes seem to have no watched the video. Stroustrup actually gave a very diplomatic answer and agreed that it was controversial, most of the people commenting seem to assume that he was telling everyone to scrap C altogether, that's not what he said in the slightest!

tomcaruth
Автор

Honestly, I like both C and C++.

C is simple, easy to learn (compared to learning c++), and it has fast execution speed.

BUT...

C++ has ALOT of features built on top of its C subset and, considering ALL these features, C++ is only minimally slower than C...

If you're going to write something that is very speed critical, hardware/driver related, or somewhat simple, use C

If you need a perfect ratio of lower development time and execution speed, making large complex programs, and/or need to interface with C, use C++

GKNrd
Автор

Alternate title: Excuses for why the C++ compiler is slower than GCC.

indycinema
Автор

*C is obsolete? * So why is it still everywhere? GNU/Linux, (Windows, OS X, BSD, Android, iOS, drivers, embedded systems, etc). Linux is *everywhere* and if you want to do serious dev work on Linux then you'd better know some C. For 40+ years many languages have tried to take C's place and failed. C might not be modern but it is no less "obsolete" than a paintbrush is because of airbrushes. *Some things are timeless.*

GroudFrank
Автор

In my opinion, C is really useful for using as a library. For example, in network protocols, C libraries that have functions that call values from sensors on a network can be easily wrapped in Python or Lua.

samshersidhu
Автор

Bikes are obsolete because we have motorcycles.

sammbci
Автор

This is actually not even a topic of discussion amongst programmers. Do you know that when you use C++ minus the OOP capabilities, you are writing plain C? I think Bjarne shouldn't have even started this discussion, because no normal programmers ever talk about this stupid topic. This topic just spurs up stupid affections for C as if it was an old man dying. C isn't an old man, when you write C++ you are writing C. Finish this fucking topic!!!

Sal-zitu
Автор

I admit i am new to the whole thing, but i find C plays nicer when writing programs in assembly.

acommenter