C++ Logo

std-discussion

Advanced search

Re: Are Exceptions deeply flawed?

From: Dmitry <dimanne_at_[hidden]>
Date: Fri, 9 Aug 2019 20:42:57 +0100
>
> It doesn't use RTTI so it has the same cost as std::expected yet allows
> to separate success and failure like current exceptions. I don't see a
> reason to have std::expected in the standard if we gonna get std::error.
>

But wait, is not it Sutter's std::error from this proposal -
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf?
If yes, it is going to be even worse than current exceptions, due to
concerns regarding its extensibility.
Read my post on reddit -
https://www.reddit.com/r/cpp/comments/cliw5j/should_not_exceptions_be_finally_deprecated/
in particular, "Zero-overhead deterministic exceptions" section.

Received on 2019-08-09 14:45:25