Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  16 Jul 2026, Konstantin Olchanski, Info, c++ exceptions, follow up 
    Reply  16 Jul 2026, Konstantin Olchanski, Info, c++ exceptions, follow up 
       Reply  16 Jul 2026, Yiwen Yang, Info, c++ exceptions, follow up 
          Reply  16 Jul 2026, Yiwen Yang, Info, c++ exceptions, follow up main.cpp
             Reply  20 Jul 2026, Konstantin Olchanski, Info, c++ exceptions, follow up 
Message ID: 3245     Entry time: 16 Jul 2026     Reply to this: 3246
Author: Konstantin Olchanski 
Topic: Info 
Subject: c++ exceptions, follow up 
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.
ELOG V3.1.6-083448f7