Re:C++26 Reflections adventures and compile time UML
by spacechild1 on Sunday August 03, 2025 @03:35AM
(#44774845)
Constexpr if and fold expressions have been a god send!
Re:C++26 Reflections adventures and compile time UML
by corysama on Sunday August 03, 2025 @01:33AM
(#44774291)
The history of C++ has been one long loop of:
1. So many necessary common practices of C++ are far too complicated!
2. Std committee adds features to make those practices simpler.
3. C++ keeps adding features. Itβs too big. They should cut out the old stuff!
4. The std committee points at the decade-long Python 3 fiasco.
5. Repeat.
Re:C++26 Reflections adventures and compile time UML
by birn559 on Sunday August 03, 2025 @01:46AM
(#44774353)
Do they point at python 3? They were committed to backward compatibility long before python3 happened.
To me it feels like they have fleshed out key paradigms so that is not a mess anymore. They are not there yet with compile time evaluation (constexpr consteval,...), at least with C++20, not sure if it's mostly finished with C++23/26.
The language itself and std is quite bloated but writing modern C++ isn't that complicated anymore in my experience.
Re:C++26 Reflections adventures and compile time UML
by zozbot234 on Sunday August 03, 2025 @06:12AM
(#44775497)
It's pure Stockholm syndome. There's even a nice C++ committee paper that summarizes this as "Remember the Vasa!" https://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0977r0...
And even if it's true that some things can be done already with specific compilers and implementation-specific hacks, it would be really nice to be able to do those things more straightforwardly.
My experience with C++ changes has been that the recent additions to compile-time metaprogramming operations is that they improve compile times rather than make it worse, because you don't have to do things like std::enable_if<> hacks and recursive templates to do things that a simple generic lambda or constexpr conditional will do, which are more difficult for both you and the compiler.