Bjarne Stroustrup gave a nice talk at CERN, good enough to bring Rene Brun out of retirement to ask a few
questions at the 1:16:50 mark.
https://indico.cern.ch/event/1696048/
https://videos.cern.ch/record/3026440
Good listen, but closer to home:
Stroustrup slides have a wee reference to a CppCon-2024 video "C++ exceptions for smaller firmware", I gave
it a listen. The guy talks fast and waves hands vigorously, but his material is solid.
In the first 30 minutes he busts the myth that embedded programming can not/should not use exceptions (with
numbers and example code).
In the second 30 minutes he demonstrates the insane code complexity required to implement exceptions, and
that also makes per-call error checking very cheap (compares all three "return bool", "return
std::expected", "throw exception", with disassembly of example code)
The the third 30 minutes he talks about project level implications of using exceptions vs other methods of
error handling (one example is audacity).
If you did not want to use exceptions before watching this talk, you will after!
https://www.youtube.com/watch?v=bY2FlayomlE
K.O.
... but wait !!! there is more !!!
C++ exceptions and alternatives by Bjarne Stroustrup
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1947r0.pdf |