C++ Reflection - Back on Track - David Olsen - C++Now 2024

Ғылым және технология

www.cppnow.org​
---
C++ Reflection - Back on Track - David Olsen - C++Now 2024
---
C++ reflection has been a long-sought goal of users and language designers. But previous attempts have failed to get wide enough support to make it into the C++ standard or be widely implemented. A newly revised design has incorporated the lessons learned from previous proposals and is gaining momentum in the C++ standards committee.
This presentation will cover the current reflection proposal. I will go over how it works, how to use it, and how it compares to other reflection proposals and implementations. There will be plenty of code examples, compiled by real compilers that have already implemented the proposal, showing how reflection enables useful techniques that had been previously out of reach.
Attendees will come away from this session with an appreciation for the power and usefulness of reflection, and with the knowledge of how to start writing reflection-based code.
---
Slides: github.com/boostcon/cppnow_pr...
Undo: Debug your hardest C++ bugs with time travel debugging - Learn more at bit.ly/cppnow24
---
David Olsen
David Olsen has three decades of software development experience in a variety of programming languages and development environments. For the last seven years he has been the lead engineer for the NVIDIA HPC C++ compiler, focusing on running standard parallel algorithms on GPUs. He is a member of the ISO C++ committee, where he was the champion for the extended floating-point feature in C++23.
---
C++Now 2025 - 28th April - 2nd May
C++Now is an annual onsite international C++ programming and coding conference held in Aspen, Colarado. For all C++ developers, C++ software engineers and those involved with the C++ language, CppNow provides an indepth and technical content provided by the best and brightest C++ experts of the C++ world.
Annual CppNow Conference - www.cppnow.org
/ cppnow​
/ cppnow
/ cppnow
/ cppnow
mastodon.social/@cppnow
Video Sponsors: millennium and think-cell
---
Videos Filmed & Edited By Bash Films: bashfilms.com/
KZread Channel Managed & Optimized By Digital Medium Ltd: events.digital-medium.co.uk
---
#boost #cpp #programming #cplusplus #cppprogramming

Пікірлер: 15

  • @VoidloniXaarii
    @VoidloniXaarii20 күн бұрын

    Having listened to tens of hours on reflection I feel this brilliant talk has finally brought me closer to beginning to be on a path to starting to understand the road to reflection in c++ ! Thank you! ❤🙏

  • @higaski
    @higaski22 күн бұрын

    The "is this a complete class" problem already exists in C++20 with concepts. It can lead to ambiguous situations where one compiler claims a concept is true and the next one tells you it's not.

  • @aniketbisht2823
    @aniketbisht282322 күн бұрын

    30:55 If you can reflect expressions recursively (as an AST) along with "constexpr printing" (there is a proposal for that) then static analyzers as libraries are a possibility. Many warnings could be implemented by developers who are not compiler engineers (and work on GCC/Clang/MSVC) and made available to the general masses as a proof of concept in the form of a library. I think this should be pursued as the AST is already generated by the compiler and can be reused by the programmer.

  • @xorxavier
    @xorxavier22 күн бұрын

    This is some exciting stuff! Im glad to see the design for reflection has started maturing and stabilizing. Would be amazing if this elephant of a feature can sneak its way into 26 ^_^

  • @dexterman6361
    @dexterman636120 күн бұрын

    Please be in C++26

  • @Roibarkan
    @RoibarkanАй бұрын

    Great introduction to an exciting new era for C++!!!

  • @Lircking
    @Lircking22 күн бұрын

    this gave me existential dread lol

  • @27182818284590452354
    @2718281828459045235422 күн бұрын

    Now if we can replace templates with functions that return reflections the nightmare of a language within a language can finally be over.

  • @LeDabe
    @LeDabe9 күн бұрын

    How is std::meta::info handled across ABI boundaries ?

  • @David_Olsen

    @David_Olsen

    5 күн бұрын

    Reflection is entirely a compile-time feature. std::meta::info objects shouldn't exist at runtime, so they won't normally be a factor in the runtime ABI of a component.

  • @sergeykolesnik1171

    @sergeykolesnik1171

    4 күн бұрын

    meta info is useless at runtime (as stated in the video), it is always a result of a consteval function. Those are not exported, so no much sense in ABI for meta info.

  • @bernhardmanfredgruber7156

    @bernhardmanfredgruber7156

    4 күн бұрын

    It does not need to, since values of `std::meta::info` are only created from `consteval` functions and thus never make it past the compiler front end.

  • @acmdz
    @acmdz22 күн бұрын

    C++ is **so** back!

  • @joshnjoshgaming
    @joshnjoshgaming22 күн бұрын

    cool stuff B)

  • @gossip6112
    @gossip611219 күн бұрын

    OK, but what about Rust?

Келесі