[reflection] Which if any reflection library to use
I'm working on code that will need to use reflection, and would like to know if boost already has a reflection library, or uses one preferred library? I know there are future C++ proposals such as those listed below, and am curious if any of them have already been implemented somewhere? http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0590r0.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0385r2.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0194r2.html
On 20.07.2017 11:51, RAM via Boost wrote:
I'm working on code that will need to use reflection, and would like to know if boost already has a reflection library, or uses one preferred library?
I know there are future C++ proposals such as those listed below, and am curious if any of them have already been implemented somewhere?
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0590r0.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0385r2.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0194r2.html
I'm not aware of any recent effort, but years ago when David Abrahams developed Boost.Python, the idea came up to separate out the Python-specific parts, putting the remainder into a frontend-agnostic "LangBinding" library, which would be mostly all about reflection. I have no idea what state this is in, whether anything beyond some initial planning was done to push that idea further. In any case, the current Boost.Python project contains a lot of functionality that may suite your needs. (And if we can revive the idea of a language-agnostic "reflection" core, and thus allow other language bindings (e.g. Lua) to be added, all the better.) Best, Stefan -- ...ich hab' noch einen Koffer in Berlin...
> On 20.07.2017 11:51, RAM via Boost wrote:
I'm working on code that will need to use reflection, and would like to know if boost already has a reflection library, or uses one preferred library?
On Thu, Jul 20, 2017 at 12:04 PM, Stefan Seefeld via Boost wrote:
I'm not aware of any recent effort, but years ago when David Abrahams developed Boost.Python, the idea came up to separate out the Python-specific parts, putting the remainder into a frontend-agnostic "LangBinding" library, which would be mostly all about reflection.
Thank you, I will look into this --Sid
On Thu, Jul 20, 2017 at 11:51 AM, RAM via Boost
I'm working on code that will need to use reflection, and would like to know if boost already has a reflection library, or uses one preferred library?
The closet thing to reflection I've seen in Boost would be the Boost.Fusion adapt macros. They actually work quite well.
I know there are future C++ proposals such as those listed below, and am curious if any of them have already been implemented somewhere?
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0590r0.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0385r2.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0194r2.html
I'm a co-author of P0194. The companion paper (http://wg21.link/p0578) is a bit more reader friendly and links to a clang-based implementation. -- David Sankel
On Thu, Jul 20, 2017 at 11:51 AM, RAM via Boost
I wouldn't say that reflection is not a concern for most C++ programmers. I think a more accurate description is that lacking certain language features makes it impossible to do more advanced reflection, and even simple reflection is pretty complicated. This is why we are working on adding reflection capabilities to the language.
participants (4)
-
David Sankel
-
David Stone
-
RAM
-
Stefan Seefeld