I seriously question how committed C++ is to zero-cost abstractions when they designed and standardized an entire standard library that assumes you’re using exceptions and doesn’t really work well without them.
I mean, what do you do if a constructor fails and you don’t have exceptions?
-
-
There are places in the language that are designed around exceptions as the main failure mechanism, for sure. A lot of programmers would be happier if C++ had a tiered error-handling model and they could just turn off the highest-level tier.
-
That’s all I’m referring to. Would be nice if they had Result types in the STL :)
- 2 more replies
New conversation -
-
-
Then you use a static factory function instead. Just as in Rust.
-
Without the syntactic sugar and library support around Result that Rust has.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.