THE VIDEO SHELF · c++ exception handling
CppCon 2015: Andrei Alexandrescu “Declarative Control Flow"
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 HN readers recommended it
Pointed to in threads on defer, scope_exit and RAII as the clearest treatment of scope guards.
This is a summary from the source dataset, not an endorsement by Hacker News or the video creator.
Video & recommendation details
- Creator / channel
- CppCon
- Topic
- c++ exception handling
- Format
- talk
- Level
- advanced
- HN recommenders in dataset
- 2
- HN mentions in dataset
- 5
- Recommendation years in dataset
- 2016–2022
These counts and years describe the included Hacker News records; they are not YouTube views or the video’s publication date.
From the original HN conversations
Excerpts from the recorded comments. Follow each source for the full comment and surrounding discussion.
Google is an example that writing production code that doesn't use exceptions is possible, not that this is the right thing to do. They said that their decision was primarily legacy-motivated (in short, they were fearing that introducing exceptions in a non-RAII codebase would lead …
Ace17 on Hacker News · 2016-07
In Memory management in C programs (2014)Andrei Alexandrescu has a fun talk about implementing scope_exit using a new C++17 function: std::uncaught_exceptions (which is a tweak to std::uncaught_exception). Fundamentally, it doesn't really solve the destructor throwing exceptions issue though. [VIDEO]
uep on Hacker News · 2018-02
In Scope exit in C++11 (2012)
Summaries, classifications and recommendation records are from the HackerTube source dataset. Read about this library and its limitations.