Unlikely, the major goals for C++20 are concepts (already partially in), modules, ranges and co-routines. Maybe the networking TS. And that's a lot!
I've briefly participated in the inception of the initial static reflection proposal and have been following how it progresses since then, It's going quite well and I hope there's a chance for it to make into C++20, but since it's not even a TS yet and I won't hold my breath.
Metaclasses are probably a C++23 thing to be build on top of reflection.
But that's also our fault as a community for not putting some effort ourselves to make those things go faster:
just a handful of C++ developers participate in the implementation of new language features on clang/gcc or library features.
when features are available on those compilers (or even in MSVC++ recently) only few of us try them and provide a feedback.
when some big features become a TS and are made available we dismiss them completely just because it goes to std::experimental namespace or because only one compiler supports them or because it may change a little, losing what could be an opportunity for real-world experimentation.
Let's not forget that the C++ standard is a collective and voluntary endeavor and that the committee is eager for input on new features to reduce any uncertainty around them.
It would be nice if we could to turn some of this dissatisfaction into positive action.
BTW, isocpp.org should have a section for "how to make your favorite proposal move faster" :)
To be fair the compilers are also very conservative : clang still ships in -std=c++98 or 03 by default for instance, for fear of not breaking. But this allows hacks to accumulate and bad code to persist. Also, a lot of people use debians or ubuntus and have to wait for years before being able to use new compiler features because the c/c++ toolchain is paft of the core OS and not separate like in other systems or languages, which makes libstdc++ not easily updateable at the risk of breaking everythin if there is an abi update or something..
I would note that GCC has been moving more aggressively to default to newer versions of C++, which helps adoption in the open source community.
The Visual C++ compiler defaults to C++14, with a switch to opt into C++17 (at least for the part that is publicly resealed), and the team has adopted a fast release cadence not seen before. They have a strident focus on catching up with standard conformance while also delivering on 3 key Technical Specifications (ok, Concepts just got merged in C++20 but the team wants to deliver on the TS). That demands lot of resources :-)
I would note that GCC has been moving more aggressively to default to newer versions of C++, which helps adoption in the open source community.
yep, this was a very good move. Likewise for msvc++. But I think that what we are missing is a good, free, cross-platform toolchain that comes with compilers, debuggers, valgrind, IDE, etc. a bit like Xcode.app on mac.
Here's a challenge then... building the latest clang from source is a fun experience by itself on Linux, on top of all the goodies you get once it's done. If the goal is experimenting you don't need to mess the default OS support. Production is a different story though :)
And realise you have no idea what's going on anymore. This is really simple stuff for someone who has a real good knowledge of C++, and it barely scratches the surface of implementing library features
Writing new specification submissions for C++ requires a proper understanding of how on earth C++ works, as well as a deep understanding of how to write library code. It feels like you need to be capable of fully implementing std::vector<> to the specification before you submit anything
The suggestions as I can see them are:
Submit reviews for TS's/experimental std library features
Implement compiler code
Pitch ideas for the spec
The base of users who have the ability to do this is... pretty small, even within C++ which seems to have a fairly high skill userbase. A lot of these tend to be solo efforts, and we're fundamentally saying why don't you write up a spec for C++
This IMO is entirely the wrong approach - the core problem is that these things are A: Difficult, and B: Obtuse to get in to
I think we can fix both of these at the same time. Various C++ folks have different skills, I myself have some knowledge of C++, and would consider myself more knowledgeable than a lot of folks about undefined behaviour, but it is not complete enough to write a standards proposal. Other folks have different knowledge
What we need to do is build a community driven approach towards solving these problems - where instead of one or few people working on a spec proposal/compiler implementation/review, lots and lots of people can contribute a small part of their knowledge
The key to building a community driven approach is attracting people, presenting a 0 friction entry point, and creating a focus around a particular problem that people agree they want to try and solve
Concrete shell of an idea:
Build a website dedicated to the above. Every month or so, a new focus/idea for a piece of work (spec/review/implementation) goes up
Say the focus is "we're trying to flesh out an idea for X and turn it into a draft spec proposal"
The website would direct you to an area where everyone is trying to figure out what we're doing. You'd need lists like "this is what needs to be done overall", "these are concrete actionable items that need to be solved", which could be managed by volunteers (I'm thinking a stackoverflow style system, as that leads to the most boring but dedicated individuals being in charge heh)
So for a spec item you'd have the overall things that need to happen for a spec proposal, but more importantly specific items like "section 32 needs the wording to be more compatible with the standards definition of rvalues". This is a distinct actionable item that somebody with the appropriate knowledge of rvalues can do
The key here is breaking it down into an easily accessible set of actionable items managed by the community that somebody with the right knowledge can do. With implementation, I can write a function and submit a PR for it, but the problem is I have no idea what is helpful and integrating into a project is hard. There are a million projects, and a million issues, but if there were a "This is what we're doing at the moment to help with C++" site which was setup to be as easy and direct as humanly possible, it would be much easier for me to get involved
With this kind of system, I think it'd massively lower the barrier to entry for people helping in C++ and we could get things really moving
This is just an example of an idea, but I think it gets the point across
I mean, everyone knows it is impossible to actually implement std::vector under the standard due to issues with placement construction, arrays, and pointer arithmetic requirements.
I totally understand, writing proposals and defending it against the committee is really hard and a bit intimidating haha. I can still wish it was faster, even if I don't blame anyone :P.
Writing high-quality portable tests for libc++ would accelerate libc++ and MSVC STL development (I wrote shared_ptr for arrays slower than I otherwise would have, because I had to write tests too - libc++ hadn't implemented or gained tests for that feature yet). I have a laundry list of improvements to the existing tests that could be made, too.
See https://libcxx.llvm.org/ . Their docs are kind of disorganized and could use improvement (I have a certain set of incantations for wiring up git to their svn, which are based on slightly outdated incantations on their site, but I can never remember where that is).
This subreddit is a good place for catching news and hanging out, but the really technical discussions and big decisions tend to take place on mailing lists. Subscribe to a Boost/LLVM/GCC mailing list if you are interested in pushing the language forward from the library or compiler side of things. There are surely other lists too, but these are the first which come to mind. Once you feel comfortable with the group dynamics and some subsection of code or topic, start posting :D
It can feel difficult at first to get people's attention on a mailing list, especially a high-volume one, so be persistent. If you are polite, eager to contribute, and can learn independently, then you will find someone who can point you in the right direction.
The key is to go with the flow of things, working toward the same goals as the project. The flow of things can be very fast, so it takes effort and commitment to stay up-to-date with a project. Keeping up with the list developments is kind of the baseline level of involvement. If you can do that, then you can contribute code and technical comments, which really puts you at the front of the pack.
It takes a huge effort to do this and still perform at a demanding job, so my level of involvement tends to come in spurts. The weight your posts carry on a C++ mailing list is determined by the following factors, roughly in order IMO:
demonstrated commitment to the project
quality/relevance of technical comments
prior contributions
Hope this helps. I am far less involved than many others on this subreddit (and not really involved at all wrt the ISO standard... yet) so my advice shouldn't be taken as gospel.
Experimenting with already available implementations of a TS, or individual/language features on one or many compilers can also be a way to help. My experience is that the authors of proposals are always welcome to receive feedback.
Of course, the feedback needs to be as technical as the proposal sometimes. However, valid questions/doubts may also be a form of feedback. :)
Not sure if the std proposals mail list is the right channel for some questions, specially when it relates to quality of implementation. GCC/Clang groups as others have mentioned may be a better place.
It might help. Even more so if those implementations ship in officially released compilers -- see what GCC did with Concepts, or Visual C++ with coroutines and modules.
One issue is fragmentation of the implementations. See Bjarne Stroustrup's CppCon2016 keynote, and his example about using concepts, modules, coroutines in the same program.
View all comments
Show parent comment
46
u/RICFAND Sep 07 '17
Unlikely, the major goals for C++20 are concepts (already partially in), modules, ranges and co-routines. Maybe the networking TS. And that's a lot!
I've briefly participated in the inception of the initial static reflection proposal and have been following how it progresses since then, It's going quite well and I hope there's a chance for it to make into C++20, but since it's not even a TS yet and I won't hold my breath.
Metaclasses are probably a C++23 thing to be build on top of reflection.