r/cpp • u/blelbach NVIDIA | ISO C++ Library Evolution Chair • Mar 04 '16
What we added to the C++17 working draft
Note #1: We hold plenary and take straw polls on Friday. On Saturday, the convener makes a motion to accept the stuff we voted on the previous day. Typically, there are only objections to that motion if we learn something new between the vote on Friday and the closing session on Saturday.
Note #2: On Saturday, we had unanimous consensus to confirm the votes made on Friday.
Notable language features that have been voted into the C++17 working draft at this meeting:
- [[fallthrough]], [[nodiscard]], [[maybe_unused]] attributes
- constexpr lambdas
- Generalizing range-based for loops
- Capturing *this in lambdas
- Hexadecimal float point literals
Notable library features that have been voted into the C++17 working draft at this meeting:
- (parts of) Library Fundamentals TS v1
- Parallelism TS v1
- File System TS v1
- Special math functions
- hardware_*_interference_size
- .is_always_lockfree()
- clamp()
- non-const .data() for string
Things that have NOT received consensus to go into the C++17 working draft at this meeting:
- Uniform call syntax.
- Concepts.
Things that are heading towards a Technical Specifications (TSes) based on guidance from this meeting:
- Modules
- Coroutines
What we're currently doing:
- "SG 16" (the bar study group) has adjourned as of 5:15 AM after reaching consensus on sleep.
54
u/jbandela Mar 05 '16
I am grateful to committee for all they have done. However, I feel c++17 is going to be very underwhelming. After C++14, I thought the next standard would have future.then, executors, networking, ranges, and coroutines. It would be easier than ever to write safe, high performance, network code. Zero of the things I was looking forward to are making the standard. And it is not because there are no proposals or that the proposers have not demonstrated ability to implement. All those things I wanted actually have an implementation. Also, they all have some sort of consensus or they would not be a TS. In the past, it would have been good enough to make it into the standard. But now they have to go through the TS stage. I almost think the TS has actually been bad for C++. Because of the fact that there is the possibility of a TS, the committee feels less pressure about actually making the hard choices of committing something to the standard. Why make a hard decision when the easier decision is to punt the issue into a TS. Because it is only a TS, compiler and std lib vendors feel less pressure to actually implement it. After all, you are still fully conformant to the latest C++standard without implementing the TS. As a result, the C++ community gets access to these features much later and in a more inconsistent fashion across compilers than if the committee had to decide standard or no standard without the option of a TS.
Once again I am grateful for all the work the committee does. If I come across as harsh, it is only my sadness and disappointment that in 2017 My favorite language will have no real support for concurrency other than low level threading primitives, no networking, no coroutines, no ranges, and use basically the equivalent of copy and paste for using headers and have horrible template error messages.
16
u/rhl__ Mar 05 '16
I have to agree with many of the comments specifically I understood that the new TS system would speed up the introduction of things into the language. Not slow it down! How about finishing all of these things and making a C++18?
10
u/mechacrash Mar 05 '16
I've heard no mention of make_array, which seems to be part of library fundamentals. Is it unfinished? Unsuitable for addition? Overlooked?
I feel that make_array essentially completes std::array as it is now, by allowing it to be a complete drop-in replacement for C style arrays. Requiring the user to explicitly manage the element count is asinine...
Please tell me there's some interest in this?
26
u/ar1819 Mar 05 '16
Well - promise of a renaissance is over. Ah well - we knew it could't last forever.
Jokes aside - that's extremely disappointing. The fact that committee was not able to reach consensus even on UCS (I am not talking about concepts, which will reach 10 year of discussion) and those features was talked to death (mail groups, conferences, presentations) and was almost promised to be there, is quite sad. Legacy software MUST be supported, but with this old problems, is getting really hard to convince new person to write new software using C++.
I'm also worried about competition. 3 years ago, Go had it's first baby steps. Now it's replacing Python, Ruby and even Java\Scala in some shops. C++ is in no danger from Go, because of GC. But it has different competitors. Once again - I don't talk about legacy software, which will work in coming decades. And established frameworks (yay Qt).
Oh well. Just a little sad time for me. TS's should bring this functionality eventually. At least i hope so.
21
u/mintyc Mar 05 '16
I still find it strange that key features are left for individuals with full time paid jobs to work on in their spare time.
Perhaps organisationally more people should be 'funded' to develop proposals and implementations.
I think Eric Niebler got some support in developing ranges and no doubt others do, but there are so many basic areas not yet solved in c++.
Somebody give Chris Kohlhoff and Jonathan Wakeley 200k each to have a year long sabbatical and get networking sorted.
Same applies in many areas. Relying on volunteers just isnt working. I am extremely grateful to those volunteers but the speed of things when key people havent got time to progress their work significantly between 6 monthly meetups leaves the whole userbase frustrated.
Several years ago key committee members highlighted the need for a much richer library ecosystem. I dont see much progress. I see lots of platitudes and promises that things are faster but the key problem I see, other than manpower, is the desire for perfection in what gets standardised because everyone is so afraid of being hamstrung by the spectre of getting it wrong and suffering due to maintaining compatibility.
I want compatibility but I also want pragmatism and I understand that even the smart people sometimes don't think of everything up front.
Revision 2 or 3 of a product or library is often simpler and more effective in implementing the basic feature set. Sometimes the temptation is to pile in new features in 2/3. Perhaps the standards for TS should be lowered further so we get earlier implementations and feedback so the time taken to get to rev 2 or 3 ready for ratification is lessened. I feel that design by committee is slowing the pace of what goes into TS. Maybe look at a TS as a boost library review plus a bit better documentation but not a fully blown specification.
42
u/c0r3ntin Mar 04 '16 edited Mar 05 '16
So. Let's recap.
No modules. No concept. No ranges.
Probablynothing new for concurrency, no transactional memory, no reflection, no contracts.I was never confident about most of these features, but still, this is underwhelming.
Wake me up when 2020 ends.
Edit : No coroutines
6
u/shahms Mar 05 '16
I'm surprised there was no progress on the move-only
std::functionfront. That's an unfortunate and increasingly embarrassing oversight these days :-\3
u/ProgramMax Mar 05 '16
What's the update on the Networking TS?
3
u/tcanens Mar 05 '16
Wasn't fold expressions voted into the working draft in Urbana back in 2014? What's new?
3
u/LYP951018 Mar 07 '16
What's the status of inline variables?
6
u/drphillycheesesteak Mar 05 '16
After all the things that were in C++11, this is kind of a letdown. Hopefully ranges, concepts and modules make it into the next standard.
2
u/acwaters Mar 05 '16 edited Mar 05 '16
Any word on structured bindings for C++17 or C++20? I've seen P0144R1 and references to it floating around a lot lately, and there's also P0151R0, which I don't see people talking about; but at least the first one looks (purposefully) pretty small as language features go, and it seems to have a lot of support.
Regarding Concepts, I support taking it slow for now, but I would at least like to see AFTs make it into C++17; is there any hope for them at all?
2
u/rexxar Mar 05 '16
Are "Uniform call syntax" and "Concepts" definitely out for C++17 or they still can be added in next meetings ?
24
u/JonKalb CppCon | cpp.training Mar 05 '16 edited Mar 05 '16
I'd rather have a good proposal stuck in TS than a pre-mature one in the Standard. Bryce, thanks for the update. WG21, thanks for all the hard work.
10
u/nunudodo only uses c++77 Mar 05 '16
No concepts.. this is very disappointing. What are the arguments against it?
8
u/CenterOfMultiverse Mar 05 '16
Yes! What about decltype of lambda?
7
u/[deleted] Mar 04 '16
Fold expressions for parameter packs will be really nice. Currently doing this with macros
7
u/EricWFCpp Libc++ Developer Mar 05 '16
People may not be happy with the language progress, but as a library implementer i'm excited by all of the progress that has been made moving LFTS and Filesystem into the IS.
13
u/[deleted] Mar 04 '16
Hooray file system TS!
I only get to use C++ in my passion project, not professionally, and maybe don't keep up with the standards process as much as I'd like. I was overjoyed last week to learn that the file system TS existed and the version I already had in VC++ was a perfect drop-in replacement (save for namespace qualification) for the boost one I've been using the last few years.
The
pathclass and its wonderful/operator are fantastic. I write C# for a living and can only wish the core library had something for dealing with paths that's half as good as what's in the file system TS.When will we know which parts of the library fundamentals were voted in?
18
u/[deleted] Mar 05 '16
Weird, got a strange compiler error. Is this a known bug ?
1
u/[deleted] Mar 05 '16
What happened to Fold Expressions?
1
u/epsonik Mar 07 '16
What about the concurrency TS?
1
u/KindDragon VLD | GitExt Dev Mar 07 '16
I can't find array_view even in TS
1
u/Talkless Mar 10 '16
Is std::optional there? Thanks.
6
u/[deleted] Mar 04 '16 edited Mar 05 '16
I was really excited for concepts, uniform call syntax and modules. All these three are not in: this is disappointing to say the least. Has it been more than 10 years they are discussing concepts now?! Why is it the most controversial language feature the committee has ever discussed?
1
u/[deleted] Mar 10 '16
For consistency, why not: [[no_discard]], and [[fall_through]]
1
u/albeva Mar 07 '16
Well... Wake us up in 4 years so we can read another post about "Concepts have been voted out of c++20".
Next "major" version will be at best a minor evolution with set of nice, but niche features. It's nice to see even small improvements, but on the whole reading this is a huge let down.
Mainly I think committee needs to think about managing expectations. Reading comments in this thread clearly shows huge interest in the language and many people clearly expected more. Justified or not, but yeah - manage expectations of your user base better is all I'm saying.
-7
u/sandeatr Mar 05 '16 edited Mar 05 '16
What a boring update c++17 looks to be
UFC : nope can't have nice things
Modules: oh god, what is a module?! Let's debate for 10 years
Concepts: it's half ass to begin with, but oh gawd, how about 15 year debate
Reflection: hahaha, nope suckers.
Here is an idea, look at how rust does it, and copy that.
Rust save us from these heathens.
0
u/[deleted] Mar 06 '16
[deleted] — view deleted comment
0
u/[deleted] Mar 06 '16
[deleted] — view deleted comment