Skip to content
0:00 / 0:00

#c++exceptions#boost.outcome#errorhandling

Deterministic Disappointment by Niall Douglas

C/C++ Dublin User Group

1.4K subscribers • 2 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • Presented by Niall Douglas, C++ committee member
  • Linked in the descriptionSlides on Google Slides
  • An opinion. It argues one side of a question engineers disagree on.

Advanced. Deep dive for people who know the field.

3.5K views8 years ago2 recommendations

Programming languagesSystems programmingC++Performance and optimization

Niall Douglas discusses the history and future of deterministic error handling and exceptions in C++.

Niall covers all the ways past, present and future that one can disappoint deterministically in C++. Content: 1. What is disappointment? 2. What is determinism? 3. The direction of C++ 4. Future disappointment in C++? 5. Achieving the future today a. C++ 11 system_error b. C++ 11 P1028 SG14 status_code c. C++ 14 (Boost.) Outcome Slides: docs.google.com/presentation/d/1fSkpD51FKmy8VEO9P86jWN6tOEaB…. For some background about Niall's talk, please check out his paper entitled "P1095R0/N2289: Zero overhead deterministic failure - A unified mechanism for C and C++" here: open-std.org/jtc1/sc22/wg14/www/docs/n2289.pdf Niall is part of International Standardisation of C++, serving on multiple committees and study groups for many years, currently working on proposals like Low Level File I/O library for C++, C++ deterministic exceptions, new standard error object, new calling convention for all C speaking languages. Niall is one of the authors of the Boost.AFIO v2 and Boost Outcome and has spoken as a domain expert on multiple occasions at the major global C++ conferences, CppCon, ACCU, C++ Now, Meeting C++.

Why it's here

2 people recommend this

What people say. Recommended as an in-depth critique of C++ exception handling and an explanation of zero-overhead alternatives.

Moments people linked to

mihaitodoron Lobsters • Recommends

Deterministic Disappointment "Deterministic Disappointment" by Niall Douglas Slides: https://docs.google.com/presentation/d/1fSkpD51FKmy8VEO9P86jWN6tOEaBmzHOXo14zLRkFKE/edit#slide=id.p For some background about this talk, please check out Niall's paper entitled "P1095R0/N2289: Zero overhead deterministic failure - A unified mechanism for C and C++" here: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2289.pdf

u/dmyrelotin r/programming • Recommends

On “C++ exceptions under the hood”

…se much more damage than the benefit. It can easily cause exception safety problems that lead to security vulnerabilities, use-after-free, double-free, CFI violation etc. **It is never designed for handling errors. You cannot use that for sanitizing input for example because that leads to denial of service. (Aka 100x slower than system calls)** [video That is why C++ EH is very wrong in the first place because it is not an error handling mechanism. It is a misdesigned std::terminate() replacement. Handling heap allocation failure is already a historical mistake. You do not deal with stack allocation failure. Nobody handles stack allocation failure then why do you handling heap allocati…
1View on Reddit

u/dmyrelotin r/programming • Mentions

On “gmp: "Risc V is a terrible architecture"”

gmp is not just popular. it is actually what the crucial dependency of GCC uses. GCC also needs mpfr, mpc. mpfr and mpc they all rely on gmp and probably they use carry flags tricks too. boost library also provides wrappers for gmp. OpenSSL plus a lot of other cryptography things need carry flags too. Linux Kernel's crypto modules also use carry flags. Also carry flag might be even more important in the future too because Herb Sutter proposes the new P0709 exception mechanism that would use carry flag as the descriminate for propagating exceptions. [video
15View on Reddit