Sujet : Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c++Date : 25. Jun 2025, 20:03:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <103hh5j$2ui1d$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 25/06/2025 17:52,
Muttley@dastardlyhq.com wrote:
On Wed, 25 Jun 2025 15:37:29 GMT
scott@slp53.sl.home (Scott Lurndal) gabbled:
Muttley@dastardlyhq.com writes:
On Wed, 25 Jun 2025 16:48:39 +0300
Michael S <already5chosen@yahoo.com> gabbled:
On Wed, 25 Jun 2025 08:47:23 -0000 (UTC)
Muttley@dastardlyhq.com wrote:
>
On Sun, 22 Jun 2025 19:37:39 -0500
Lynn McGuire <lynnmcguire5@gmail.com> gabbled:
"Trip report: June 2025 ISO C++ standards meeting (Sofia, Bulgaria)"
by Herb Sutter
>
https://herbsutter.com/2025/06/21/trip-report-june-2025-iso-c-standards-meet
in
g
-sofia-bulgaria/
>
"Today marks a turning point in C++: A few minutes ago, the C++
committee voted the first seven (7) papers for compile-time
reflection
>
What for? What exactly does it bring to the table except more
complexity in an already overcomplex language?
>
>
Ability to serialize structures (for example, to JASON or XML) in generic
way.
>
I read something about that but it made no sense to me. Seemed to be a case
complex constexpr functions to do it with the fields and values hard coded
(obviously or no constexpr), but like most constexpressions IME, you can just
work out the result beforehand and hard code *that* instead.
>
Still, if the standards committee want to make the C++ learning curve for
beginners even steeper then they're going to succeed beyond their wildest
dreams. No wonder a lot of CS courses ditched C++ (and to be fair Java) a long
>
time a go and focused on Python.
>
Reflection was a useful feature in Java, I suspect that at least part
of the rationale for the addition to C++ is to match the corresponding
Java feature.
>
>
https://www.oracle.com/technical-resources/articles/java/javareflection.html
IIRC correctly the java version is runtime reflection, the C++ version will
be compile time which is utterly pointless. If the compiler knows whats there
at compile them then so do you and you can write your code accordingly.
I am not sure what your biggest problem is - your depressive pessimism, your ignorance, or your lack of imagination. Have you ever actually written code in C++? It is /full/ of features where the compiler knows something, and the programmer does not want to type it out manually every time - "auto", templates, constexpr functions, type traits, etc. Even C idioms like "p = malloc(100 * sizeof *p);" are asking the compiler to fill in something the programmer already knows.
You complain about C++ being complex - features like reflection make it /less/ complex in several ways. It makes it far easier to make your own classes like tuples or variants (the std:: versions don't fit everyone). There are all sorts of use-cases where reflection will let you write simpler C++ code, or write things only once but have the information available in different forms (enum->string and string->enum being the typical example).
And yes, you want /compile-time/ reflection in C++. You can't do java-style runtime reflection without a common base class, which is an overhead C++ thankfully does not have. But if you want run-time reflection in a class hierarchy, I am pretty sure it could be done using a virtual function in the base class, and CRTP inheritance in each descendant with compile-time reflection and templates in the implementation of the CRTP-inherited base. That kind of thing will be fun to try out once C++26 is more complete.
I am certainly looking forward to reflection and contracts in C++26 - features that I had hoped to see long ago.
Date | Sujet | # | | Auteur |
23 Jun 25 | "Trip report: June 2025 ISO C++ standards meeting (Sofia, Bulgaria)" by Herb Sutter | 30 | | Lynn McGuire |
25 Jun 25 |  Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, Bulgaria)" | 29 | | Muttley |
25 Jun 25 |   Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, Bulgaria)" | 28 | | Michael S |
25 Jun 25 |    Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 27 | | Muttley |
25 Jun 25 |     Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 26 | | Muttley |
25 Jun 25 |      Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 25 | | David Brown |
26 Jun 25 |       Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 23 | | Muttley |
26 Jun 25 |        Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 22 | | David Brown |
26 Jun 25 |         Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 1 | | Muttley |
27 Jun 25 |         Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 20 | | wij |
27 Jun 25 |          Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 5 | | David Brown |
28 Jun 25 |           Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 4 | | wij |
28 Jun 25 |            Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 3 | | David Brown |
28 Jun 25 |             Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 2 | | wij |
28 Jun 25 |              Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 1 | | David Brown |
27 Jun 25 |          Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 14 | | Muttley |
27 Jun 25 |           Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 1 | | Chris M. Thomasson |
28 Jun 25 |           Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 12 | | wij |
28 Jun 25 |            Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 11 | | Muttley |
28 Jun 25 |             Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 10 | | wij |
29 Jun 25 |              Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 2 | | Chris M. Thomasson |
29 Jun 25 |               Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 1 | | Muttley |
29 Jun 25 |              Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 7 | | Muttley |
29 Jun 25 |               Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 6 | | wij |
29 Jun 25 |                Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 5 | | Muttley |
29 Jun 25 |                 Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 4 | | wij |
30 Jun 25 |                  Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 3 | | Muttley |
30 Jun 25 |                   Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 2 | | wij |
30 Jun 25 |                    Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 1 | | Muttley |
26 Jun 25 |       Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, | 1 | | candycanearter07 |