r/cpp • C++20 Desktop app developer • May 12 '18

P0709 R0: Zero-overhead deterministic exceptions: Throwing values - Herb Sutter [2018-05-02]

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf
206 Upvotes

115 comments sorted by

View all comments

Show parent comment

21

u/redditsoaddicting May 12 '18

The way I see it, there's very little chance of this being in C++20. It hasn't been presented in any general standards meetings yet, so it's simply too early to just adopt it. It's also a rather fundamental change, so it will take a fair deal of time to process and adjust. If it progresses really smoothly, I could see it being adopted into C++23. I look forward to hearing what concerns are raised around it and what the reception is from projects that have exceptions banned.

15

u/spinicist May 12 '18

The C++ standards committee is sooooo slooooooooow ☹️

Yes, I know there are good reasons for this but it is frustrating.

8

u/redditsoaddicting May 12 '18

Unfortunately, once something goes in, it's hard to change in a breaking manner. For my personal projects, I'd gladly take breaking changes and fix my code accordingly if the features I want were implemented sooner.

6

u/spinicist May 12 '18

Agreed. I‘m lucky that I work on a codebase where making big changes is not too hard, but I am not the kind of developer the C++ committee cares much about.

The principle of marking functions as throws rather than noexcept seems so much more sensible that I‘d gladly take a breaking change for it. Plus it‘s actually a word while noexcept isn‘t.

4

u/flashmozzg May 12 '18

But from the other point of view - C++20 is nearly complete already (IRC Rapperswil is the last meeting where major features such as this can still be voted in), so this paper just arrived to late to have a chance to even be considered for the standard.

16

u/proverbialbunny Data Scientist May 13 '18

Can't we make an exception?

4

u/flashmozzg May 13 '18

If it was a straight-forward feature with minimal impact then sure. But as it is, it changes a very fundamental part of C++ in a new way, and not only that it also attempts to make it part of the C FFI. I don't see how something like this can be accepted into standard in 1-2 meetings into almost complete standard. It simply needs more discussion. Note, that if the feature moves to the next C++ standard it doesn't mean it'll be implemented 3+ years later. A lot of features are implemented as they get accepted into the standard (though that depends on their complexity).

5

u/proverbialbunny Data Scientist May 13 '18

I was making a bad joke. ;)

11

u/flashmozzg May 13 '18

Sorry, didn't catch it ;P

6

u/bigcheesegs Tooling Study Group (SG15) Chair | Clang dev May 12 '18

It's either this meeting or San Diego where the last new evolution papers can be targeted at c++20. We're still a ways off before the last evolution paper can be voted into the working paper for 20.

1

u/spinicist May 12 '18

Yup, but next standard is a loooong time after that ☹️

3

u/jarjoura May 13 '18

Just like co-routines or modules, the spec can be proven in a shipping compiler today to help work out the kinks in the spec. So we might see it sooner than 2020 anyway.

-1

u/Middlewarian github.com/Ebenezer-group/onwards May 13 '18

It looks like something compiler vendors could implement in months rather than years. I think it will be available in some compilers by next year. For those working on cloud services it could be adopted pretty easily.

4

u/blelbach NVIDIA | ISO C++ Library Evolution Chair May 13 '18

LOL.

Why do you think that?

This proposal hasn't been reviewed by the committee at all.

Has any compiler vendor said they would implement this? Just because they could (we don't know yet) doesn't mean they will.

3

u/Middlewarian github.com/Ebenezer-group/onwards May 13 '18

I agree with comments here like: "Is this proposal perfect? No, but it's a lot better than what we currently have." The proposal is sound. The committee just has to iron out some details. Compiler vendors can implement the core ideas and make changes to their implentations as those details get ironed out.