hackertube.io

CppCon 2015: Andrei Alexandrescu “Declarative Control Flow"

CppCon · talk · Watch on YouTube

What it is

Andrei Alexandrescu's CppCon 2015 talk on handling exceptional control flow declaratively in C++. It uses scope guards with success and failure variants, built on std::uncaught_exceptions, to replace ad hoc RAII classes and rethrowing try/catch blocks.

Why Hacker News recommends it

Pointed to in threads on defer, scope_exit and RAII as the clearest treatment of scope guards.

  • 2 people recommended it
  • 2 different months
  • 0 strong recommendations
  • first 2016, last 2022

What HN commenters said

  1. “Andrei Alexandrescu - Declarative Control Flow”

    Alexandrescu on declarative control flow for convoluted resource cleanup

    Ace17, 2016-07 · Recommendation · in “Memory management in C programs (2014)”

  2. “Andrei Alexandrescu has a fun talk about implementing scope_exit”

    Fun talk on implementing scope_exit with std::uncaught_exceptions

    uep, 2018-02 · Recommendation · in “Scope exit in C++11 (2012)”

Excerpts from Hacker News comments, linked to the originals. Summaries and labels were written by a language model from those comments.

Topics: scope guard, raii, uncaught_exceptions, cppcon, andrei alexandrescu

Also recommended by the same people