Loading…
Attending this event?
Wednesday September 18, 2024 16:45 - 17:45 MDT
We’ve had exceptions in C++ since before the first standard. C++17 introduced std::optional and C++23 std::expected (along with the so-called Monadic Operations for both types).

What should we use and when?

Meanwhile we still have older approaches, such as boolean or error code returns, as well as global or thread local error status or pointer or reference arguments.

Do these still have a place?

And where does assert fit in? And the (hopefully) upcoming contracts?

Perhaps more importantly, once we’ve examined all the trade-offs, can we defer any of those decisions to when we are best positioned to commit to them?

Erroneous conditions can have a big impact on your code’s safety and security, so error handling shouldn’t just be left to the “exercise left for the reader” in the books we used to read. Let’s get this all straight.
Speakers
avatar for Phil Nash

Phil Nash

Yak Shaver, Shaved Yaks Ltd
Phil is the original author of the C++ test framework, Catch2. He's an independent trainer and consultant. He's also a member of the ISO C++ standards committee, organiser of C++ London and C++ on Sea, as well as co-host and producer of CppCast. More generally he's an advocate for... Read More →
Wednesday September 18, 2024 16:45 - 17:45 MDT
Adams A

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Share Modal

Share this link via

Or copy link