Bjarne Stroustrup on Learning More Than One Programming Language

The C++ creator discusses perspectives, machine architecture and abstraction.

BSBjarne StroustrupGuest
Channel
Lex Fridman
Published
Nov 10, 2019
Video
6:56
Read
1 min
Original
English
Open on YouTube
Scroll to read and the video shrinks to the bottom-right corner. Captions follow your reading language.
Reading languageAvailable in 2 languages
You're reading the original English.
SUMMARY

In 30 seconds

Stroustrup argues that a second language can change how programmers think and that clear abstractions can coexist with efficient code.

  1. 1The second languageThe number matters less than broadening perspective.
  2. 2Know the machineArchitecture can affect performance.
  3. 3Clear abstractionsReadable code can also optimize well.
  4. 4Different paradigmsFunctional and rapid-development languages offer different lessons.

Takeaways

  1. Learn more than one programming language.
  2. Understand architecture when performance matters.
  3. Clear abstractions can help optimization.
FULL TEXT

Read the edited text by chapter

Transcript only
01

More than one language

Lex Fridman asks C++ creator Bjarne Stroustrup why programmers should learn several languages and what they can take from different traditions.

Lex Fridman asks C++ creator Bjarne Stroustrup why programmers should learn several languages and what they can take from different traditions.

Stroustrup recalls knowing many languages when he developed C++. He says languages were smaller then, and learning them did not always require mastering a large programming environment.

He stresses that the exact number is less important than knowing more than one language. As with learning a foreign language, a second programming language can reveal assumptions and broaden how one thinks.

02

Architecture and performance

Stroustrup says the second language is particularly valuable; after that, learning further languages can be easier. He also values understanding machine code and architecture.

Stroustrup says the second language is particularly valuable; after that, learning further languages can be easier. He also values understanding machine code and architecture.

He notes that performance can depend on architectural details such as caching. Understanding the machine can help programmers reason about high-performance code.

03

Abstraction and optimization

For modern C++, he argues that expressing ideas clearly can help both the programmer and the optimizer. Sometimes removing clever code produces a faster result.

For modern C++, he argues that expressing ideas clearly can help both the programmer and the optimizer. Sometimes removing clever code produces a faster result.

He recalls a Jason Turner presentation using a small Pong implementation to demonstrate changes in source abstractions and generated assembly.

In Stroustrup’s account, the source became clearer while the generated code became smaller. He uses this example to argue that useful abstractions and efficient output can coexist.

04

Other paradigms

Beyond machine code and C++, he recommends trying a functional language to learn precise expression and strong type systems, and a language suited to building something quickly, such as Python, Ruby or JavaScript.

Beyond machine code and C++, he recommends trying a functional language to learn precise expression and strong type systems, and a language suited to building something quickly, such as Python, Ruby or JavaScript.

More from this channel

3 slides3:34:27EN
Lex Fridman· Oct 26, 2026Podcast · 4 speakersAI, Mathematics, and the Meaning of a ProofGuest Steven Brunton, Ankur Moitra, Alex Kontorovich · Host Lex FridmanLex Fridman and three mathematicians discuss recent AI-generated research, hard open problems and what human understanding contributes.MathematicsAI for scienceAI research+2
3:36:56EN
Lex Fridman· Sep 16, 2026PodcastPsychiatry Has Never Found Its PenicillinHost Lex FridmanHistorian Andrew Scull tells Lex Fridman why the field can ease symptoms, has never cured a major mental illness, and keeps paying for overconfidence with patients' lives.Mental HealthPublic HealthNeuroscience
5:15:51EN
Lex Fridman· Aug 26, 2026Podcast · 2 speakersDHH Did Not Write a Line of Omarchy QuattroGuest DHH · Host Lex FridmanThirteen months after a skeptical conversation with Lex Fridman, the Rails creator describes how Opus 4.5, a swarm of coding agents, and a one-minute Linux installer ended his era of hand-chiseled Ruby.Coding agentsVibe CodingAgent engineering+3
3:12:58EN
Lex Fridman· Aug 12, 2026Podcast · 2 speakersOne Cold Shower, Twenty Champions: How Khabib Nurmagomedov Was ForgedGuest Khabib Nurmagomedov · Host Lex FridmanIn a Makhachkala school gym, seventy men shared one shower, and the water was only cold.Martial ArtsCombat SportsCoaching+3
3:46:18EN
Lex Fridman· Jul 28, 2026Podcast · 2 speakersIf You Take Slavery Out of the Picture, There Is No Civil WarGuest Gary Gallagher · Host Lex FridmanIn 1860, enslaved people were worth more than every railroad and factory in the United States combined.Political PhilosophyLeadershipHistory
3:51:47EN
Lex Fridman· Jun 30, 2026Podcast · 2 speakersForty-Six Percent of Emperors Were Overthrown. The Empire Lasted AnywayGuest Anthony Kaldellis · Host Lex FridmanHistorian Anthony Kaldellis walks Lex Fridman through 2,200 years of Roman history and argues that what we call Byzantium was Rome itself.Political PhilosophyGeopoliticsLeadership