Preliminaries¶

  • If you are using connect locally, mute your speaker and mic
  • If you are remote, mute your mic

Class Information¶

  • https://git.corp.adobe.com/better-code/class/wiki

Brief History of C++¶

  • 1979 Bjarne Stroustrup begins work on C with Classes
  • 1983 "C with Classes" renamed C++
  • 1985 The C++ Programming Language is published along with first commercial compiler, Cfront
  • 1989 C++ 2.0 released with Cfront 2.0
  • 1998 C++ published as ISO standard (C++98) with the STL from Alex Stepanov and Meng Lee
  • 2003 C++03 ISO standard, minor revisions to C++98
  • 2011 C++11 Major language update
  • 2014 C++14 Revisions, minor additions, corrections to C++11
  • 2017 C++17 Significant (not quite major) update
  • 2020 ...

With C++11 there were significant process changes to encourage working groups to publish Technical Specifications (TS's) for experimental features, language and library, in advance of them being incorporated into the language. The process replaced the prior Technical Report (TR1) process which was used to vet library extensions prior to C++11.

C++11, C++14, C++17... C++20, TSs...¶

Clang¶

  • 2000 LLVM project is started at University of Illinois at Urbana-Champaign by Vikram Adve and Chris Lattner
    • later adding ObjC and C support
  • 2005 Apple hires Lattner, initially working on Clang OpenGL compiler
  • 2009 GCC runtime library moves to GPLv3 license, Apple (and others) move to add C++ support to Clang
  • 2010 Clang++ able to build Boost libraries and passes nearly all tests
  • Clang now actively developed by Apple, Microsoft, Google, ARM, Sony, Intel, AMD and others
  • LLVM has spawned numerous other languages, including Swift

Boost¶

  • 1998 Beman Dawes and Robert Klarer propose the idea for creating a web based library repository

The Free Lunch Is Over¶

  • 2005 Herb Sutter publishes The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software

Language Evolution¶

  • 1987 Need for common functional language identified and work on Haskell begins
  • 2005 Joel Spolsky publishes The Perils of JavaSchools
  • JavaScript Transpilers: Babel, CoffeeScript, TypeScript, Dart, GWT, Elm, ...

Online Resources¶

Information:¶

  • r/cpp: Reddit forum to find news and blogs
  • Cpplang Slack: Get your questions answered fast
  • CppCast: The only podcast dedicated to C++
  • isocpp: The standard committee and recent news
  • stackoverflow: Get your questions answered well

Reference:¶

  • cppreference: The best online reference for C++
  • working draft: The definitive answer

Tools:¶

  • Compiler Explorer (godbolt): See what the code generates
  • Coliru: Just run some code
  • Clang in Browser: Demo of Clang to wasm in the browser
  • Quick C++ Benchmarks: Handy way to run small benchmarks and generate graphs

Other Tools¶

  • clang-tidy: Diagnose and fix your code
  • include-what-you-use: Help to prune the include lists and add direct dependencies
  • cling: Interpreted C++
  • jupyter: Data science notebook, can work with cling
  • Xcode includes clang static analyzer and sanitizers

Moving to cmake would simplify the process of using many tools.

Demo¶

vector<int> a = {30, 20, 40, 10};
sort(begin(a), end(a));
for(const auto& e : a) cout << e << endl;