• Re: =?UTF-8?Q?=22My_C++_on_Sea_talk_video_posted=3A_=E2=80=9CThree_Cool

    From Richard@21:1/5 to All on Mon Aug 25 20:59:46 2025
    [Please do not mail me a copy of your followup]

    Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code <1082u8b$b6v$1@dont-email.me> thusly:

    "My C++ on Sea talk video posted: Three Cool Things in C++26" by Herb
    Sutter

    https://herbsutter.com/2025/08/19/my-c-on-sea-talk-video-posted-three-cool-things-in-c26/

    I'm subscribed to C++ on Sea's channel <https://www.youtube.com/@cpponsea>
    and watched this video when it came out. Direct video link: <https://www.youtube.com/watch?v=kKbT0Vg3ISw>

    The addition of reflection in C++26 is a really good starting point
    for automating some tedious tasks. Things like enum-to-string and string-to-enum code that's annoying to keep up-to-date as the enum set
    evolves. At previous employers, we had an XML data model file and ran
    a code generator tool from the Java world on the XML file to produce C++
    source files which were added to our repository. (We were generating
    protobuf message structures from the data model, among other things.)
    I could easily see C++26 reflection facilities making this simpler.

    I agree with Herb that we're only just starting to see the power of
    the reflection facilities added to C++26. There are already some
    libraries cropping up on github that look interesting.

    However, I would plead with the authors of such libraries to document
    their libraries! I came across several libraries that looked
    "interesting" but didn't provide any tests, examples or documentation
    for the reflection feature they purported to implement, such as
    dependency injection.

    -- Richard

    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)