C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Abbreviating error handling

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sun, 27 Mar 2022 16:09:03 -0400
Why is this better than P0709's take on light-weight exception
handling? Particularly the version that requires annotating
expressions that can throw such exceptions?

The implementation for P0709 is based on ABI return pathways, not
exception pathways like dynamic exception handling. The only
difference is that you're not explicitly using a variant-like object;
it's handled by the ABI. Either way, the function has to be annotated
in some way to make it happen.

I really don't like trying to codify some variant type interface in
this way, when we could create an equivalent syntax that just works
with equal-if-not-better performance and far more intuitive syntax.

Received on 2022-03-27 20:09:21