Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,

Liste des GroupesRevenir à cl c++ 
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 Sutter30Lynn McGuire
25 Jun 25 `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, Bulgaria)"29Muttley
25 Jun 25  `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia, Bulgaria)"28Michael S
25 Jun 25   `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,27Muttley
25 Jun 25    `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,26Muttley
25 Jun 25     `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,25David Brown
26 Jun 25      +* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,23Muttley
26 Jun 25      i`* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,22David Brown
26 Jun 25      i +- Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,1Muttley
27 Jun 25      i `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,20wij
27 Jun 25      i  +* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,5David Brown
28 Jun 25      i  i`* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,4wij
28 Jun 25      i  i `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,3David Brown
28 Jun 25      i  i  `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,2wij
28 Jun 25      i  i   `- Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,1David Brown
27 Jun 25      i  `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,14Muttley
27 Jun 25      i   +- Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,1Chris M. Thomasson
28 Jun 25      i   `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,12wij
28 Jun 25      i    `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,11Muttley
28 Jun 25      i     `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,10wij
29 Jun 25      i      +* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,2Chris M. Thomasson
29 Jun 25      i      i`- Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,1Muttley
29 Jun 25      i      `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,7Muttley
29 Jun 25      i       `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,6wij
29 Jun 25      i        `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,5Muttley
29 Jun 25      i         `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,4wij
30 Jun 25      i          `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,3Muttley
30 Jun 25      i           `* Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,2wij
30 Jun 25      i            `- Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,1Muttley
26 Jun 25      `- Re: "Trip report: June 2025 ISO C++ standards meeting (Sofia,1candycanearter07

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal