Arnaud Porterie - The Truth About C++
Upcoming SlideShare
Loading in...5
×
 

Arnaud Porterie - The Truth About C++

on

  • 758 views

Talk for While 42 Paris, September 12th @ Société Générale CIB

Talk for While 42 Paris, September 12th @ Société Générale CIB

Statistics

Views

Total Views
758
Views on SlideShare
696
Embed Views
62

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 62

https://twitter.com 62

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Arnaud Porterie - The Truth About C++ Arnaud Porterie - The Truth About C++ Presentation Transcript

  • 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