Hacker Newsnew | past | comments | ask | show | jobs | submit | fthiesen's commentslogin

Do let me know if you have any feedback on the library/code/utilities!

You can play with it, there is a docker container in the repo that you can use for development purposes! (with clang-p2996 branch)

Another option would be to copy some stuff over to the compiler-explorer and use a "single-header" version of the library there. I can facilitate this in case you are interested. They have reflection for EDG, GCC and Clang (I am only working with clang for now)


If you want, give it a shot with the prebuilt image and let me know if it works for you.

I want to make this project as mature as possible for when support arrives at the upstream version of clang, gcc and msvc. Feedback is appreciated!


lol


It is making it's way to GCC as well: https://www.reddit.com/r/cpp/comments/1ojbv1a/gcc_implementa...

It is officially part of C++26, so only a matter of time before being part of the major compilers (:

I've added a pre-built image in the github repo, feel free to try it out if you are curious and let me know if you face any issues/bugs!


Thanks again for creating this and sharing it here. Honestly makes me want to pick up C++ for a project just to try it out (along with reflection and other new features).


Btw, it seems that the reflection implementations are progressing quite fast. There is already a gcc version with reflection support that is available on compiler explorer: https://www.reddit.com/r/cpp/comments/1ojbv1a/gcc_implementa...

Will add support for it as soon as I have some time to spare!


Thanks for the suggestion, let me take a good look at callbacks.

Another thing that I can't make work elegantly is compiling template functions from C++, since we have no clue to guess which types will be instantiated in the Python code (and they can even depend on user input, so only determined at runtime)


I've added a prebuilt image, so it should be straightforward to try it out. If you have any problems with working on that prebuilt image please open an issue or reach out to me!


The P2996 definitely provides a way to work with reflection, the syntax can be a bit weird at first, but it gets more and more familiar. They have some cool examples here (https://isocpp.org/files/papers/P2996R13.html)

This idea of using C++26 compiler just for codegen sounds interesting. Will definitely give it some thought, thanks for the suggestion (:


His blog and books are great. RIP


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: