SlideShare a Scribd company logo
The

*
truth

about C++

* Commonly accepted among a representative population of 1

Arnaud Porterie – While42 Paris – 20130912
Thursday, September 12, 13
Who am I?
• Arnaud Porterie - @icecrime
• Epitech 2007
• Mostly worked with C++ since then

Thursday, September 12, 13
Objectives of this talk

Thursday, September 12, 13
Objectives of this talk
• Discuss common misconceptions

Thursday, September 12, 13
Objectives of this talk
• Discuss common misconceptions
• Understand the recent hype

Thursday, September 12, 13
Objectives of this talk
• Discuss common misconceptions
• Understand the recent hype
• Show that C++ has a (bright) future

Thursday, September 12, 13
Objectives of this talk
• Discuss common misconceptions
• Understand the recent hype
• Show that C++ has a (bright) future
• In less than 1/2h

Thursday, September 12, 13
Objectives of this talk
• Discuss common misconceptions
• Understand the recent hype
• Show that C++ has a (bright) future
• In less than 1/2h
• Without showing code
Thursday, September 12, 13
C++ misconceptions

Thursday, September 12, 13
#1 - C++ never evolves

Thursday, September 12, 13
C++98

C++03

2002
1998

2005

2007

2003
C# 1.0

Thursday, September 12, 13

C++11

2010

2013

2011
C# 2.0 C# 3.0

C# 4.0

C# 5.0
13 years for a new C++?

Thursday, September 12, 13
Evolution didn’t wait for a
new standard
• C++ changed radically in the past decade
• So called “Modern C++”
• “Modern C++ design”, A. Alexandrescu, 2001
• Boost library, the standard’s sandbox

Thursday, September 12, 13
• Community driven evolution
• Committee standardized already widely
adopted libraries

• C++11 also adds many new language
features and libraries

Thursday, September 12, 13
#2 - C++ is about manual
memory management

Thursday, September 12, 13
C++ greatest myth
• If you delete, you’re doing it wrong
• RAII is C++ most important idiom
• The stack is fast and foolproof
• std::shared_ptr, std::unique_ptr, ...

Thursday, September 12, 13
Pro tip #1
Want to test if someone knows C++?

Thursday, September 12, 13
Pro tip #1
Want to test if someone knows C++?
Ask about memory management.

Thursday, September 12, 13
Pro tip #2
Just ignore any wrong answer to #1.

Thursday, September 12, 13
Pro tip #2
Just ignore any wrong answer to #1.
You’ll never recruit anyone.

Thursday, September 12, 13
#3 - C++ is too hard

Thursday, September 12, 13
Can’t really deny that...

Thursday, September 12, 13
It’s not getting any better
• ISO/IEC 14882:2003: 786 pages
• ISO/IEC 14882:2011: 1328 pages
• C++11 is supposedly more accessible
• I say C++11 can’t properly be used without
a good understanding of C++03

Thursday, September 12, 13
Multi-paradigm language
• Procedural
• Generic
• Functional
• Object-oriented
• Variety does not make things easier for the
newcomer

Thursday, September 12, 13
So, is C++ is back?

Thursday, September 12, 13
• Was it ever gone?
• The world is built on C++!
• One thing has changed: C++ is back as a

first class language in Microsoft’s strategy

Thursday, September 12, 13
What future for C++ ?

Thursday, September 12, 13
Choosing C++ is a case of
premature optimization
– Miguel de Icaza
Xamarin CTO & level 60 troll

Thursday, September 12, 13
• The tradeoff between productivity and
control is not as huge as most believe

• The real question is: today, are there that

many problems that justify the extra effort?

Thursday, September 12, 13
Phase/trend

Major constraints

2x efficient apps runs...

1950s - 1990s
Compute-constrainted

Processor

2x compute speed
2x users

1995ish - 2007ish
Surplus local compute +
low UI innovation (WIMP)

Programmer time

n/a

200x Mobile

Processor
Power (battery life)

2x compute speed
2x battery life

2009 Cloud

Power (31%)
Server HW (57%)

0.5x power
0.5x nodes

2009 Heterogeneous cores,
GPGPU

Power (dark silicon)
Processor

0.5x power
2x compute speed

Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk

Thursday, September 12, 13
Phase/trend

Major constraints

2x efficient apps runs...

1950s - 1990s
Compute-constrainted

Processor

2x compute speed
2x users

1995ish - 2007ish
Surplus local compute +
low UI innovation (WIMP)

Programmer time

n/a

200x Mobile

Processor
Power (battery life)

2x compute speed
2x battery life

2009 Cloud

Power (31%)
Server HW (57%)

0.5x power
0.5x nodes

2009 Heterogeneous cores,
GPGPU

Power (dark silicon)
Processor

0.5x power
2x compute speed

Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk

Thursday, September 12, 13
Phase/trend

Major constraints

2x efficient apps runs...

1950s - 1990s
Compute-constrainted

Processor

2x compute speed
2x users

1995ish - 2007ish
Surplus local compute +
low UI innovation (WIMP)

Programmer time

n/a

200x Mobile

Processor
Power (battery life)

2x compute speed
2x battery life

2009 Cloud

Power (31%)
Server HW (57%)

0.5x power
0.5x nodes

2009 Heterogeneous cores,
GPGPU

Power (dark silicon)
Processor

0.5x power
2x compute speed

Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk

Thursday, September 12, 13
Phase/trend

Major constraints

2x efficient apps runs...

1950s - 1990s
Compute-constrainted

Processor

2x compute speed
2x users

1995ish - 2007ish
Surplus local compute +
low UI innovation (WIMP)

Programmer time

n/a

200x Mobile

Processor
Power (battery life)

2x compute speed
2x battery life

2009 Cloud

Power (31%)
Server HW (57%)

0.5x power
0.5x nodes

2009 Heterogeneous cores,
GPGPU

Power (dark silicon)
Processor

0.5x power
2x compute speed

Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk

Thursday, September 12, 13
Phase/trend

Major constraints

2x efficient apps runs...

1950s - 1990s
Compute-constrainted

Processor

2x compute speed
2x users

1995ish - 2007ish
Surplus local compute +
low UI innovation (WIMP)

Programmer time

n/a

200x Mobile

Processor
Power (battery life)

2x compute speed
2x battery life

2009 Cloud

Power (31%)
Server HW (57%)

0.5x power
0.5x nodes

2009 Heterogeneous cores,
GPGPU

Power (dark silicon)
Processor

0.5x power
2x compute speed

Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk

Thursday, September 12, 13
Phase/trend

Major constraints

2x efficient apps runs...

1950s - 1990s
Compute-constrainted

Processor

2x compute speed
2x users

1995ish - 2007ish
Surplus local compute +
low UI innovation (WIMP)

Programmer time

n/a

200x Mobile

Processor
Power (battery life)

2x compute speed
2x battery life

2009 Cloud

Power (31%)
Server HW (57%)

0.5x power
0.5x nodes

2009 Heterogeneous cores,
GPGPU

Power (dark silicon)
Processor

0.5x power
2x compute speed

Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk

Thursday, September 12, 13
Find your biggest cost,
and optimize for that

Thursday, September 12, 13
Example - Facebook

Thursday, September 12, 13
• Hip Hop Compiler
• HHVM JIT Compiler
• 5x faster than the interpreter

Thursday, September 12, 13
There are only two kinds of
language: the ones people complain
about and the ones nobody uses
– Bjarne Stroustrup

Thursday, September 12, 13
Questions?

Thursday, September 12, 13

More Related Content

PDF
The rise of Docker, and the future of computing
Arnaud Porterie
 
PDF
Arnaud Porterie - Using Machine & Docker to develop & build Docker
Arnaud Porterie
 
PDF
DockerCon US 2016 - Scaling Open Source operations
Arnaud Porterie
 
PDF
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
PDF
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
Arnaud Porterie
 
PDF
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
PyData
 
PPTX
Data Virtualization: revolutionizing database cloning
Kyle Hailey
 
PPTX
Goto amsterdam-2013-skinned
Ted Dunning
 
The rise of Docker, and the future of computing
Arnaud Porterie
 
Arnaud Porterie - Using Machine & Docker to develop & build Docker
Arnaud Porterie
 
DockerCon US 2016 - Scaling Open Source operations
Arnaud Porterie
 
How to contribute to large open source projects like Docker (LinuxCon 2015)
Jérôme Petazzoni
 
DockerCon US 2016 - Extending Docker With APIs, Drivers, and Plugins
Arnaud Porterie
 
Building a Cutting-Edge Data Process Environment on a Budget by Gael Varoquaux
PyData
 
Data Virtualization: revolutionizing database cloning
Kyle Hailey
 
Goto amsterdam-2013-skinned
Ted Dunning
 

Similar to Arnaud Porterie - The Truth About C++ (20)

PPTX
GoTo Amsterdam 2013 Skinned
MapR Technologies
 
PDF
Raspberry pi history, tips and use case
Masafumi Ohta
 
PPT
14 turing wics
ashish61_scs
 
PDF
Using R for the internet of things
cdhowe
 
PPT
The Ever So Slighty Geeky Quiz With Maybe
Amanda Jackson
 
PDF
Making the Most of In-Memory: More than Speed
Inside Analysis
 
PDF
The joy of computer graphics programming
Bruno Levy
 
PDF
Sacrificing the golden calf of "coding"
Christian Heilmann
 
PPTX
Agile Data: revolutionizing data and database cloning
Kyle Hailey
 
PDF
2013: Trends from the Trenches
Chris Dagdigian
 
PDF
DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify
Dataconomy Media
 
PDF
The Data Janitor Returns | Daniel Molnar | DN18
DataconomyGmbH
 
PPT
PenLUG Talk: Fast, Cheap, and Out of Control
David E. Weekly
 
ODP
Tools for artificial intelligence
Olivier Teytaud
 
PDF
What's Now - Gustavo Carriquiry
GeneXus
 
PDF
Build Low-Latency Rust Applications on ScyllaDB
ScyllaDB
 
PPTX
Buzz words-dunning-real-time-learning
Ted Dunning
 
KEY
Increasing Personal Productivity with Getting Things Done(r)
James Martin
 
PDF
What Ops Can Learn From Design
Robert Treat
 
PDF
Killing the golden calf of coding - We are Developers keynote
Christian Heilmann
 
GoTo Amsterdam 2013 Skinned
MapR Technologies
 
Raspberry pi history, tips and use case
Masafumi Ohta
 
14 turing wics
ashish61_scs
 
Using R for the internet of things
cdhowe
 
The Ever So Slighty Geeky Quiz With Maybe
Amanda Jackson
 
Making the Most of In-Memory: More than Speed
Inside Analysis
 
The joy of computer graphics programming
Bruno Levy
 
Sacrificing the golden calf of "coding"
Christian Heilmann
 
Agile Data: revolutionizing data and database cloning
Kyle Hailey
 
2013: Trends from the Trenches
Chris Dagdigian
 
DN18 | The Data Janitor Returns | Daniel Molnar | Oberlo/Shopify
Dataconomy Media
 
The Data Janitor Returns | Daniel Molnar | DN18
DataconomyGmbH
 
PenLUG Talk: Fast, Cheap, and Out of Control
David E. Weekly
 
Tools for artificial intelligence
Olivier Teytaud
 
What's Now - Gustavo Carriquiry
GeneXus
 
Build Low-Latency Rust Applications on ScyllaDB
ScyllaDB
 
Buzz words-dunning-real-time-learning
Ted Dunning
 
Increasing Personal Productivity with Getting Things Done(r)
James Martin
 
What Ops Can Learn From Design
Robert Treat
 
Killing the golden calf of coding - We are Developers keynote
Christian Heilmann
 
Ad

More from Arnaud Porterie (6)

PDF
Docker Barcelona Meetup - An Introduction to BuildKit
Arnaud Porterie
 
PDF
Building software: the lessons from open source
Arnaud Porterie
 
PDF
DockerCon EU 2015 - Windows Server Containers
Arnaud Porterie
 
PDF
DockerCon US 2015 - Engine Breakout Session
Arnaud Porterie
 
PDF
DockerCon EU 2015 - The Latest on Docker Engine
Arnaud Porterie
 
PDF
Abusing text/template for data transformation
Arnaud Porterie
 
Docker Barcelona Meetup - An Introduction to BuildKit
Arnaud Porterie
 
Building software: the lessons from open source
Arnaud Porterie
 
DockerCon EU 2015 - Windows Server Containers
Arnaud Porterie
 
DockerCon US 2015 - Engine Breakout Session
Arnaud Porterie
 
DockerCon EU 2015 - The Latest on Docker Engine
Arnaud Porterie
 
Abusing text/template for data transformation
Arnaud Porterie
 
Ad

Recently uploaded (20)

PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
 
Coupa-Overview _Assumptions presentation
annapureddyn
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 

Arnaud Porterie - The Truth About C++

  • 1. The * truth about C++ * Commonly accepted among a representative population of 1 Arnaud Porterie – While42 Paris – 20130912 Thursday, September 12, 13
  • 2. Who am I? • Arnaud Porterie - @icecrime • Epitech 2007 • Mostly worked with C++ since then Thursday, September 12, 13
  • 3. Objectives of this talk Thursday, September 12, 13
  • 4. Objectives of this talk • Discuss common misconceptions Thursday, September 12, 13
  • 5. Objectives of this talk • Discuss common misconceptions • Understand the recent hype Thursday, September 12, 13
  • 6. Objectives of this talk • Discuss common misconceptions • Understand the recent hype • Show that C++ has a (bright) future Thursday, September 12, 13
  • 7. Objectives of this talk • Discuss common misconceptions • Understand the recent hype • Show that C++ has a (bright) future • In less than 1/2h Thursday, September 12, 13
  • 8. Objectives of this talk • Discuss common misconceptions • Understand the recent hype • Show that C++ has a (bright) future • In less than 1/2h • Without showing code Thursday, September 12, 13
  • 10. #1 - C++ never evolves Thursday, September 12, 13
  • 11. C++98 C++03 2002 1998 2005 2007 2003 C# 1.0 Thursday, September 12, 13 C++11 2010 2013 2011 C# 2.0 C# 3.0 C# 4.0 C# 5.0
  • 12. 13 years for a new C++? Thursday, September 12, 13
  • 13. Evolution didn’t wait for a new standard • C++ changed radically in the past decade • So called “Modern C++” • “Modern C++ design”, A. Alexandrescu, 2001 • Boost library, the standard’s sandbox Thursday, September 12, 13
  • 14. • Community driven evolution • Committee standardized already widely adopted libraries • C++11 also adds many new language features and libraries Thursday, September 12, 13
  • 15. #2 - C++ is about manual memory management Thursday, September 12, 13
  • 16. C++ greatest myth • If you delete, you’re doing it wrong • RAII is C++ most important idiom • The stack is fast and foolproof • std::shared_ptr, std::unique_ptr, ... Thursday, September 12, 13
  • 17. Pro tip #1 Want to test if someone knows C++? Thursday, September 12, 13
  • 18. Pro tip #1 Want to test if someone knows C++? Ask about memory management. Thursday, September 12, 13
  • 19. Pro tip #2 Just ignore any wrong answer to #1. Thursday, September 12, 13
  • 20. Pro tip #2 Just ignore any wrong answer to #1. You’ll never recruit anyone. Thursday, September 12, 13
  • 21. #3 - C++ is too hard Thursday, September 12, 13
  • 22. Can’t really deny that... Thursday, September 12, 13
  • 23. It’s not getting any better • ISO/IEC 14882:2003: 786 pages • ISO/IEC 14882:2011: 1328 pages • C++11 is supposedly more accessible • I say C++11 can’t properly be used without a good understanding of C++03 Thursday, September 12, 13
  • 24. Multi-paradigm language • Procedural • Generic • Functional • Object-oriented • Variety does not make things easier for the newcomer Thursday, September 12, 13
  • 25. So, is C++ is back? Thursday, September 12, 13
  • 26. • Was it ever gone? • The world is built on C++! • One thing has changed: C++ is back as a first class language in Microsoft’s strategy Thursday, September 12, 13
  • 27. What future for C++ ? Thursday, September 12, 13
  • 28. Choosing C++ is a case of premature optimization – Miguel de Icaza Xamarin CTO & level 60 troll Thursday, September 12, 13
  • 29. • The tradeoff between productivity and control is not as huge as most believe • The real question is: today, are there that many problems that justify the extra effort? Thursday, September 12, 13
  • 30. Phase/trend Major constraints 2x efficient apps runs... 1950s - 1990s Compute-constrainted Processor 2x compute speed 2x users 1995ish - 2007ish Surplus local compute + low UI innovation (WIMP) Programmer time n/a 200x Mobile Processor Power (battery life) 2x compute speed 2x battery life 2009 Cloud Power (31%) Server HW (57%) 0.5x power 0.5x nodes 2009 Heterogeneous cores, GPGPU Power (dark silicon) Processor 0.5x power 2x compute speed Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk Thursday, September 12, 13
  • 31. Phase/trend Major constraints 2x efficient apps runs... 1950s - 1990s Compute-constrainted Processor 2x compute speed 2x users 1995ish - 2007ish Surplus local compute + low UI innovation (WIMP) Programmer time n/a 200x Mobile Processor Power (battery life) 2x compute speed 2x battery life 2009 Cloud Power (31%) Server HW (57%) 0.5x power 0.5x nodes 2009 Heterogeneous cores, GPGPU Power (dark silicon) Processor 0.5x power 2x compute speed Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk Thursday, September 12, 13
  • 32. Phase/trend Major constraints 2x efficient apps runs... 1950s - 1990s Compute-constrainted Processor 2x compute speed 2x users 1995ish - 2007ish Surplus local compute + low UI innovation (WIMP) Programmer time n/a 200x Mobile Processor Power (battery life) 2x compute speed 2x battery life 2009 Cloud Power (31%) Server HW (57%) 0.5x power 0.5x nodes 2009 Heterogeneous cores, GPGPU Power (dark silicon) Processor 0.5x power 2x compute speed Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk Thursday, September 12, 13
  • 33. Phase/trend Major constraints 2x efficient apps runs... 1950s - 1990s Compute-constrainted Processor 2x compute speed 2x users 1995ish - 2007ish Surplus local compute + low UI innovation (WIMP) Programmer time n/a 200x Mobile Processor Power (battery life) 2x compute speed 2x battery life 2009 Cloud Power (31%) Server HW (57%) 0.5x power 0.5x nodes 2009 Heterogeneous cores, GPGPU Power (dark silicon) Processor 0.5x power 2x compute speed Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk Thursday, September 12, 13
  • 34. Phase/trend Major constraints 2x efficient apps runs... 1950s - 1990s Compute-constrainted Processor 2x compute speed 2x users 1995ish - 2007ish Surplus local compute + low UI innovation (WIMP) Programmer time n/a 200x Mobile Processor Power (battery life) 2x compute speed 2x battery life 2009 Cloud Power (31%) Server HW (57%) 0.5x power 0.5x nodes 2009 Heterogeneous cores, GPGPU Power (dark silicon) Processor 0.5x power 2x compute speed Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk Thursday, September 12, 13
  • 35. Phase/trend Major constraints 2x efficient apps runs... 1950s - 1990s Compute-constrainted Processor 2x compute speed 2x users 1995ish - 2007ish Surplus local compute + low UI innovation (WIMP) Programmer time n/a 200x Mobile Processor Power (battery life) 2x compute speed 2x battery life 2009 Cloud Power (31%) Server HW (57%) 0.5x power 0.5x nodes 2009 Heterogeneous cores, GPGPU Power (dark silicon) Processor 0.5x power 2x compute speed Shamelessly stolen from Herb Sutter’s “Not your father’s C++” talk Thursday, September 12, 13
  • 36. Find your biggest cost, and optimize for that Thursday, September 12, 13
  • 37. Example - Facebook Thursday, September 12, 13
  • 38. • Hip Hop Compiler • HHVM JIT Compiler • 5x faster than the interpreter Thursday, September 12, 13
  • 39. There are only two kinds of language: the ones people complain about and the ones nobody uses – Bjarne Stroustrup Thursday, September 12, 13