r/cpp • u/adityazero • Sep 20 '26
CppCon At cppcon WG21 had a whiteboard asking attendees what they would like to have in C++29
some of the ones I remember was:
- contracts
- profiles
- delete moar stuff
I'm curious what folks here expect. Also if someone remembers rest of the list, that'd be great.
57
Upvotes
24
u/k3DW Sep 20 '26
Slight correction, WG21 did have a community exhibitor table, but we only had a retractable banner. The whiteboard belonged to the Beman Project community exhibitor table. There are some overlapping people, so I understand the mixup
To actually answer the question, my probably-bad hot take is that I want to remove std::initializer_list
25
u/Street-Anteater1234 Sep 20 '26
I want pattern matching, I hate monads.
9
u/JVApen Clever is an insult, not a compliment. - T. Winters Sep 20 '26
Some standard package management API would be nice as well
16
u/celestabesta Sep 20 '26
Hot take, but sometime within the next two standards we should sever backwards compatibility entirely.
Anyone who needs that compatibility can use cpp26 or something. It'll likely take them a decade or more to even get to that level.
I just can't foresee a future where this language doesn't overhaul itself and continues to be used by newer developers. Our two advantages as a language is the ecosystem and having the best performance. Slowly though, those gaps are closing.
It's simply too inconvenient for developers to learn and use, and adding QoL updates that keep the old way of doing things will just bloat the language to the point where it becomes impossible to learn. Imagine C++49, where there are 35 ways of initializing a variable, and the only safe one is to use the super initialize operator defined as {{#%%$&$
6
u/arihoenig Sep 20 '26
Been waiting for contracts for more than 30 years.
35
u/_Ilobilo_ Sep 20 '26
pattern matching and the ability to get every variable accessible from current context with reflection. this would allow you to do print("{var}");
74
u/BigJhonny Sep 20 '26
Epochs, followed by saner defaults.
44
u/kgnet88 Sep 20 '26
6
u/MutantSheepdog Sep 21 '26
Epochs are what I'd like to see for the long-term health of the language. Even if they committee kept changes between epochs quite small, it'd still give some path forward for the language to keep evolving without dealing with an ever accumulating pile of backwards-compatibility-friction.
Without this, we keep having to compromise on quality of certain features because we can't (for example) easily add keywords, certain syntax (like abbreviated lambdas) can lead to ambiguities, mistakes like those made with initializer lists, vector<bool> and regex can't ever be fixed without breaking existing code, etc.
14
u/trad_emark Sep 20 '26
better educational material, including about new proposals.
i have seen too many times people think that contracts will solve their user input validation.
i have seen people think that undefined behavior in the language is inexcusably bad, without understanding what ub actually is.
i have seen people saying that erroneous behavior is worse than undefined behavior, again without understanding what it is.
etc etc etc. there are millions of such cases, i just happened to think of these at the moment cos that what i see right in this thread.
10
u/m_adduci Sep 20 '26
5
u/sheckey Sep 21 '26
I’m new to a lot of modern techniques, but wanted to say I’ve enjoyed the steady advances in template programming that make it more accessible to me. So good, so any more things like that, just the small quality of life stuff!
5
u/eisenwave WG21 Member Sep 22 '26
Proper Unicode support in
to_chars,format,println, transcoding, checking for valid encoding, etc.13
u/borzykot Sep 21 '26
[](auto x)=>x.foo()or[][$1.foo()]or[][x=>x.foo()]8
u/holyblackcat Sep 21 '26 edited Sep 21 '26
Deprecate
vector<bool>already. Then maybe we can remove the specialization in 6 or 9 years.7
u/fippinvn007 Sep 20 '26
More good defaults please. I don't care about anything else.
3
u/KingAggressive1498 Sep 22 '26 edited Sep 22 '26
for low hanging fruit I haven't really seen proposed yet that I don't think would be controversial, <random> could use some more modern generators as well some distributions and filters that would be more useful for gamedev and similar. As it stands I feel there's a huge subset of C++ developers that need random numbers but don't get much utility out of the what the standard offers. Gimme some PCG and xoroshiro in the standard.
also are we getting fixed-precision large integers or no?
and is it too much to ask for fixing the aliasing shared_ptr footguns?
10
u/grafikrobot OPeNDAP/B2/EcoStd/Lyra/Predef/C++Alliance/Boost/WG21 Sep 21 '26
I would like to see more..
7
u/_w62_ Sep 20 '26
Everything proposed in C++20 works - particularly modules.
2
u/13steinj Sep 23 '26
I remember networking and constexpr numeric representations for pointers.
I think a lot of the wants just won't happen in that time frame though.
2
u/notforcing Sep 23 '26
Is it too much to hope for
int128_tanduint128_t?2
u/fdwr fdwr@github 🔍 Sep 27 '26
I don't care as much about things that could just be delivered via a library (adding it to the C++ standard simply makes it more convenient, but doesn't truly unlock anything novel), being more interested in aspects that structurally enable new control flow paradigms, such as:
matching andcase.caseranges 0 ... 9.deferblocks for reliable cleanup (for all those times when inventing dummy transient objects is overkill just to take advantage of RAII, likeCoInitializeEx()paired withdefer CoUninitialize())doexpressions to either return an expression or return from a function, which would be very nice for branching at function calls. Related to that, a return-if-failed keyword.3
u/jpakkane Meson dev Sep 21 '26
An enforcing UTF-8 string.
No std::u8string does not count, it does not enforce that its contents are valid UTF-8, they can be anything.
3
u/Gungan_Boss_Nass premature cleverization Sep 21 '26
My biggest wishlist item is smart-reference support via operator . overloads, P0252 and the long gauntlet of alternative versions that preceded and followed it.
4
u/sinfaen Sep 20 '26
Deprecate/delete plz
3
u/differentiallity Sep 20 '26
Static print, as in https://wg21.link/P2758
3
u/pjmlp Sep 20 '26
Profiles, mostly.
The actual vision, not something that might be left in POC state, depending on who is still around to carry the remaining work to C++32.
2
u/FlyingRhenquest Sep 21 '26
I want to be able to load C++ objects from shared libraries. It sucks having to fall back to C for that sort of thing.
2
u/aaronshavesha Sep 21 '26
Beyond additions like Contracts or Profiles, what C++ needs most going into C++29 is ecosystem alignment and practical readiness. Modules are a primary example: standardized in C++20, but the friction, tooling gaps, and build system hurdles mean adoption still feels experimental for many codebases. Standardizing features is only half the battle—we need assurances that features ship in a production-ready state.
2
u/_a4z Sep 21 '26
A build system and package manager standard so we do not need to put everything into std and reduce the occurence of implementation defined
2
u/UndefinedDefined Sep 22 '26
My wish: Stop adding, start removing. Nothing more much to say.
The language should evolve, but please no more below-average containers or more function representations in the standard library. Make the language great for building things so people can build what they need.
1
u/etaithespeedcuber Sep 23 '26
Forward compatibility
1
u/StockyDev Sep 21 '26
I want to be able to reflect over lambda captures.
I don't think
std::meta::members_ofcould be extended to allow for this because the standard does a lot of work to not imply how closures are implemented. So it would be incorrect to say that captures are members of a lambda.So I would like a
std::meta::captures_of1
u/qalmakka Sep 22 '26
enum unionas a true tagged union type and a replacement for std::variant + pattern matching-2
u/kevleyski Sep 20 '26
Rust like switch/case would be cool
-5
u/Anxious-Resist8344 Sep 20 '26
Nothing... let's the next 25-30 years add absolutely nothing (just removals if they need to do something).
-5
u/Background-Error-910 Sep 20 '26
more frequent language updates (such as e.g. rust has it a few weeks). it could also be opt-in. oh, and also a standardized package manager, although conan is really good i think.
2
u/Umphed Sep 20 '26
Pattern matching, injection, reflection. Thats it, we really don't need any more bullshit and 20 years of committee jerking eachother off.