C++ reflection via C++ code generation in C++ by strager

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ย. 2024
  • CppBayArea presentation by strager
    Recorded August 8, 2023 at JFrog in Sunnyvale, California
    Event sponsored by JFrog

ความคิดเห็น • 6

  • @pogboii
    @pogboii ปีที่แล้ว +2

    amazing

  • @wilsonwilson137
    @wilsonwilson137 ปีที่แล้ว +1

    wooo. nice talk.

  • @ali-4096
    @ali-4096 5 หลายเดือนก่อน

    This looks so complicated for no reason lol

  • @23bcx
    @23bcx ปีที่แล้ว +1

    This dude really just wants to code java, doesn't he?

    • @szaszm_
      @szaszm_ ปีที่แล้ว +1

      Reflection is useful, and it would be great to have it in C++, but I wouldn't go as far as a separate build step with libclang and code generation. I'm using magic_enum, concepts, metaprogramming and occasionally macros to achieve some level of reflection in C++20. I used to occasionally use reflection when doing Java. I think it's the best tool for some problems.

    • @23bcx
      @23bcx ปีที่แล้ว +4

      @@szaszm_ I am not just talking about his solution to the problem I am also talking about the problem he describes itself. In all ways this dude is thinking of C++ as if it was Java, in the same way that much of the C++ design committee has done for "modern" C++. Sure reflection is useful and there are ways to do it in C++ but C++ is also a multi-paradigm language OO is a tool not the only thing in the toolbox. I know the example he was working was "just complex enough to warrant this response" but it speaks to how much people just want to be coding java. This example should just be a function that takes in the error severity and a string of the error message, maybe some ifdefs. You dont need to make things needlessly complicated for the people you work with.