Self-Motivation
David Goggins
Former Navy Seal
Career Development
Bryan Cranston
Actor
Critical Thinking
Liv Boeree
International Poker Champion
Emotional Intelligence
Amaryllis Fox
Former CIA Clandestine Operative
Management
Chris Hadfield
Retired Canadian Astronaut & Author
Learn
from the world's big
thinkers
Start Learning

Why I Created C++

Question: What inspired you to create C++?

Bjarne Stroustrup: 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. 

Question: What makes C++ such a widely used language?

Bjarne Stroustrup: 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.

Recorded August 12, 2010

Interviewed by Max Miller

In the late 1970s, Stroustrup applied the idea of "classes" to the C programming language to create a new language that allows for high level abstraction—but is efficient and close to the hardware.

LIVE TOMORROW | Jordan Klepper: Comedians vs. the apocalypse

Join The Daily Show comedian Jordan Klepper and elite improviser Bob Kulhan live at 1 pm ET on Tuesday, July 14!

Big Think LIVE

Add event to calendar

AppleGoogleOffice 365OutlookOutlook.comYahoo

Keep reading Show less

LGBTQ+ community sees spike in first-time depression in wake of coronavirus​

Gender and sexual minority populations are experiencing rising anxiety and depression rates during the pandemic.

Photo by Chip Somodevilla/Getty Images
Coronavirus
  • Anxiety and depression rates are spiking in the LGBTQ+ community, and especially in individuals who hadn't struggled with those issues in the past.
  • Overall, depression increased by an average PHQ-9 score of 1.21 and anxiety increased by an average GAD-7 score of 3.11.
  • The researchers recommended that health care providers check in with LGBTQ+ patients about stress and screen for mood and anxiety disorders—even among those with no prior history of anxiety or depression.
Keep reading Show less

The mind-blowing science of black holes

What we know about black holes is both fascinating and scary.

Videos
  • When it comes to black holes, science simultaneously knows so much and so little, which is why they are so fascinating. Focusing on what we do know, this group of astronomers, educators, and physicists share some of the most incredible facts about the powerful and mysterious objects.
  • A black hole is so massive that light (and anything else it swallows) can't escape, says Bill Nye. You can't see a black hole, theoretical physicists Michio Kaku and Christophe Galfard explain, because it is too dark. What you can see, however, is the distortion of light around it caused by its extreme gravity.
  • Explaining one unsettling concept from astrophysics called spaghettification, astronomer Michelle Thaller says that "If you got close to a black hole there would be tides over your body that small that would rip you apart into basically a strand of spaghetti that would fall down the black hole."

Scientists see 'rarest event ever recorded' in search for dark matter

The team caught a glimpse of a process that takes 18,000,000,000,000,000,000,000 years.

Image source: Pixabay
Surprising Science
  • In Italy, a team of scientists is using a highly sophisticated detector to hunt for dark matter.
  • The team observed an ultra-rare particle interaction that reveals the half-life of a xenon-124 atom to be 18 sextillion years.
  • The half-life of a process is how long it takes for half of the radioactive nuclei present in a sample to decay.
Keep reading Show less

Space travel could create language unintelligible to people on Earth

A new study looks at what would happen to human language on a long journey to other star systems.

Credit: NASA Ames Research Center.
Surprising Science
  • A new study proposes that language could change dramatically on long space voyages.
  • Spacefaring people might lose the ability to understand the people of Earth.
  • This scenario is of particular concern for potential "generation ships".
Keep reading Show less
Quantcast