CppCon Day 4

I took much lighter notes today.

Cpp.chat - Live

  • Jon Kalb, Andrei Alexandrescu, Herb Sutter, Phil Nash
  • Methods for error handling are converging
  • Andrei: “Static-if is the unit of introspection”

Eliminating Metaprogramming from C++

  • Proposal: constexpr & maybe-constexpr function parameters
    • Works just like templates
  • There’s bugs that are known at compile-time but can’t be fixed
  • Concept: No shadow worlds
  • C++ has 4 programming langs
    • Constexpr
    • Templates
    • Macros
  • Proposal for syntax for maybe-constexpr
    • Switch constexpr on variables to “maybe compile time”
    • Use consteval for “definitely compile time”
  • Open questions:
    • How do static function variables work?
    • What’s the runtime type of a a function with compile-time parameters?

Better Code: Relationships

  • Felt really familiar, almost like Sean had already given a lot of this talk at CppCon 2015 or something.

Dawn of a New Error

  • throws keyword
  • Error codes
  • Swift/Rust/C++ all converging on something similar for error handling