Bjarne Stroustrup: Why I Created C++


In the really old days, people had to write
their code directly to work on the hardware. They wrote load and store instructions to
get stuff in and out of memory and they played about with bits and bytes and stuff. You could do pretty good work with that, but
it was very specialized. Then they figured out that you could build
languages fit for humans for specific areas. Like they built FORTRAN for engineers and
scientists and they built COBALT for businessmen. And then in the mid-’60s, a bunch of Norwegians,
mostly Ole-Johan Dahl and Kristen Nygaard thought why can’t you get a language that
sort of is fit for humans for all domains, not just linear algebra and business. And they built something called SIMULA. And that’s where they introduced the class
as the thing you have in the program to represent a concept in your application world. So if you are a mathematician, a matrix will
become a class, if you are a businessman, a personnel record might become a class, in
telecommunications a dial buffer might become a class—you can represent just about anything
as a class. And they went a little bit further and represented
relationships between classes; any hierarchical relationship could be done as a bunch of classes. So you could say that a fire engine is a kind
of a truck which is a kind of a car which is a kind of a vehicle and organize things
like that. This became know as object-oriented programming
or also in some variance of it as data abstraction. And my idea was very simple: to take the ideas
from SIMULA for general abstraction for the benefit of sort of humans representing things…
so humans could get it with low level stuff, which at that time was the best language for
that was C, which was done at Bell Labs by Dennis Ritchie. And take those two ideas and bring them together
so that you could do high-level abstraction, but efficiently enough and close enough to
the hardware for really demanding computing tasks. And that is where I came in. And so C++ has classes like SIMULA but they
run as fast as C code, so the combination becomes very useful. What makes C++ such a widely used language? If I have to characterize C++’s strength,
it comes from the ability to have abstractions and have them so efficient that you can afford
it in infrastructure. And you can access hardware directly as you
often have to do with operating systems with real time control, little things like cell
phones, and so the combination is something that is good for infrastructure in general. Another aspect that’s necessary for infrastructure
is stability. When you build an infrastructure it could
be sort of the lowest level of IBM mainframes talking to the hardware for the higher level
of software, which is a place they use C++. Or a fuel injector for a large marine diesel
engine or a browser, it has to be stable for a decade or so because you can’t afford
to fiddle with the stuff all the time. You can’t afford to rewrite it, I mean taking
one of those ships into harbor costs a lot of money. And so you need a language that’s not just
good at what it’s doing, you have to be able to rely on it being available for decades
on a variety of different hardware and to be used by programmers over a decade or two
at least. C++ is not about three decades old. And if that’s not the case, you have to
rewrite your code all the time. And that happens primarily with experimental
languages and with proprietary commercial languages that change to finish—to meet
fads. C++’s problem is the complexity part because
we haven’t been able to clean it up. There’s still code written in the 80’s
that are running and people don’t like their running codes to break. It could cost them millions or more.


100 Responses

  1. James Reddington

    May 20, 2019 4:16 am

    Bjarne: creates a programming language

    Me: after two years of computer science class I learn

  2. Rotten Brainz

    May 20, 2019 9:34 am

    I love this guy, he pretends he doesnt know assembler so he can code high level better. 🙂

  3. designstudie

    May 20, 2019 10:37 am

    no idea what this guy from Back to the future is talking about, but the comments are quite entertaining lol

  4. Brian Terrel

    May 21, 2019 9:50 am

    Not a big fan of C++ (mostly because of how it was introduced to me as a student, and how I see it taught to my students), but I am a fan of Bjarne. He strikes me as a good steward of a challenging domain.

  5. Skvala Gaming

    May 21, 2019 6:12 pm

    Couldn't he spent 30 secs to do his hair.. gosh. a lot of people are going to see you look like a homeless drunk

  6. iAreEddie

    May 22, 2019 1:50 pm

    ITT: People who failed to learn C++ and are pissed so many serious programing jobs require it

    Edit: Also, I now realize where the haircut for undead in WoW drew it's inspiration from

  7. Tomlow

    May 22, 2019 8:38 pm

    God bless this person.
    It's crazy to think that today's best performing game engines are written in a programming language over 30 years old.

  8. nosuchthing8

    May 23, 2019 7:00 am

    He created C++ to vastly increase the number of pointer proplems that existed in C.

  9. Sourabh Goel

    May 24, 2019 2:33 am

    I am C++ programmer from last 15 years and I never seen any problem which can't be fixed in c++ in the fastest way. I salute Stroustrup for his work.

  10. teenspirit1

    May 24, 2019 1:42 pm

    bjarne just forgot how c preprocessor worked and designed a whole language around C without preprocessor.

  11. Samuel Lourenço

    May 24, 2019 11:09 pm

    I pretty much prefer C and its low level stuff. It is more direct and simple, although less contained (people love containers these days, by the way). Of course C# is much worse. A simple "Hello world" in C# is just ridiculous.

    Calling C++ efficient? Nah!

  12. Thank you for your compliance

    May 25, 2019 5:23 pm

    "My idea was very simple". The best ideas are simple. It is there implementation that is most difficult. A big chapeau ! to Bjarne.

  13. NerdSweeper

    May 28, 2019 2:44 am

    Good now ask him why that ring-around-the-bald spot hair style is so popular with old men.

  14. Tamas Kalman

    May 28, 2019 8:41 pm

    i was always thinking c++ is the invention of the devil but now i understand everything.

  15. Cyber Doomgirl

    May 30, 2019 5:34 pm

    This is why you can't study it on the next college. Once you learn it there is no stopping you.

  16. Some Guy

    June 1, 2019 12:45 pm

    "If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?" — Tom Cargill

  17. Steven L

    June 1, 2019 5:35 pm

    While programming, we often take object orientated programming for granted but hearing him talk about the past, I’m really glad we users nowadays have this opportunity at all. So him taking about the creation of object orientated programming really gives a lot of perspective.

  18. Hafizuddin Zahid

    June 4, 2019 9:18 am

    saitama lost all his hair to be the strongest human
    if this guy lost all his hair, what kind of computer language he gonna create

  19. Kirrith Kovacs

    June 4, 2019 10:51 am

    I know people who can do little more than schedule something in cron, and they think they are computer gods.

  20. theemacsshibe

    June 6, 2019 7:18 am

    I'm very glad Alan Kay disowned this loser.

    C++ is not an object oriented language: it has no late binding, nor does it let anyone reason about programs at an abstract level.

  21. Custos Venetus

    June 7, 2019 6:09 am

    Thank you for your creation that is used in Unreal Engine to make amazing games. ¡Graçias! 🌿

  22. Pieter Willem Botha

    June 9, 2019 9:19 pm

    He's only explaining why C is the superior choice for programming and day-to-day use. I guess I'm just nostalgic for the days before web2.0

  23. Блейз

    June 18, 2019 12:22 am

    2020: C++ is legacy language and not for new projects. For new project use Rust, Go, Swift or D

  24. Wang Sheng

    June 29, 2019 4:06 pm

    C++ want resolve problem, but understand and being proficient about C++ is also a hard problem .
    I hope C++ go to die , it wast my much time

  25. Ramesh Kumar

    June 29, 2019 11:34 pm

    genius minds for the sake of humans… How come the first programming language was ever built?? How come someone thought of manupulating electricity

  26. Eduardo Costa

    July 8, 2019 4:32 pm

    We created C++ because we wanted money, so we pretended to have missed the `struct' type in our C book, coined the terms "classes" and "object-oriented" "programming", which we like much, and went for it. The next step was to twist the existing syntax so that our users wouldn't feel ripped off thinking all they were using was some unnecessarily complex version of good old C. Luckily for us, there's so many twats out there that we ended up succeding. That's all, let me just mention some bullshit about accessing the hardware directly so this video doesn't end up being too short.

  27. Xylon beta

    August 13, 2019 8:05 pm

    "Honestly, I made C++ to prank brainlets and see for how long they would struggle with a language purposely designed to backfire in the most aberrant, bizarre, mind-bending ways possible. Imagine my joy, seeing them struggle for 30 years now".


Leave a Reply