Open lefticus opened 1 year ago
I would upvote this 10x if I could. I have long theorized, but never had the chance/taken the time to prove, that using exceptions to report uncommon conditions can be measurably faster than manually checking and propagating error return values, especially with a deep-ish call stack.
could you add std::expected
to the comparison?
could you add
std::expected
to the comparison?
Good idea. I've observed that it's shockingly easy to use std::expected inefficiently.
cough implicit conversions cough
A comparison of the monadic call chain interface from std::optional in C++23 and using exceptions to handle error cases instead.