On 3/5/2021 2:18 AM, Richard Hodges via Boost wrote:
A friendly reminder that the review period for [Boost.Describe] is half way through. We've had some excellent feedback already, and would value more. If you can spare a few hours of your valuable time, please consider reviewing this neat little library and posing your results on this mailing list. The invitation is repeated below: The Boost formal review of the Describe starts Monday, taking place from March 1st, 2021 to March 10th, 2021 (inclusive).
The library is authored by Peter Dimov.
Documentation: https://pdimov.github.io/describe/doc/html/describe.html Source: https://github.com/pdimov/describe
The library provides a simple means of providing reflection for structures and enums in C++.
The documentation contains a number of common motivating examples, including:
- A universal print function https://pdimov.github.io/describe/doc/html/describe.html#example_print_funct...
- JSON serialisation https://pdimov.github.io/describe/doc/html/describe.html#example_to_json
Please provide in your review information you think is valuable to understand your choice to ACCEPT or REJECT including Describe as a Boost library. Please be explicit about your decision (ACCEPT or REJECT).
This is my review of the Describe library.
Some other questions you might want to consider answering:
- What is your evaluation of the design?
Very clean and easy to use.
- What is your evaluation of the implementation?
I was curious, since what Peter is doing in C++14 certainly is better than what I was able to do in TTI in C++03, but I did not look at the actual implementation.
- What is your evaluation of the documentation?
I think the documentation was pretty easy to understand and is documentation the way I like it as it explains the concepts of the library along with examples and reference. One area that was a bit confusing for me is where I could use the macros in code. Evidently the term 'namescope scope" was not completely clear to me and I found out that this evidently means that I can not use any of the macros locally within a function, as this produced a number of compiler errors. But anywhere outside a function block seemed OK. Obviously the BOOST_DESCRIBE_CLASS has to be within a class definition, but the class definition evidently can no be a local class inside of a function. Also the documentation did not say anything about using the same macro, with the same parameters, more than once so playing around with it I noticed that I could use the same macro more than once in different namespaces but not in the same namespace. Maybe a little more clarification in the doc about where the macros can be used would be helpful, but then again "namespace scope" might be more informative to others than to me. The fact that evidently class templates can also be Described should be mentioned in the documentation.
- What is your evaluation of the potential usefulness of the library?
Quite useful for examining enums and class/structs generically in templates, where the information has been "Described". Unfortunately some of the limitations of Describe in picking up class/struct information, such as the overloaded member functions and reference members, will make Describe less practically useful. I am wondering if when Describing enums the information about the underlying type of an enum might be useful, even if I can not think of any use for it right now.
- Did you try to use the library? With which compiler(s)? Did you have any problems?
I tried to use it with the latest gcc-10.2, clang-11.0, and VC++14.2. I had a problem with VC++14.2 with the new preprocessor, which I reported as a Describe issue, and Peter said he will be looking into it. Otherwise the library worked fine.
- How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
I spent a few hours with it. Read the docs, created some examples of my own, and tried most everything out.
- Are you knowledgeable about the problem domain?
I have long been interested in C++ reflection and I know there have been efforts in the past at having compilers produce reflection information which could be used at compile time and/or at run time. I recall some C++ programmers connected to CERN working along these lines in the past. I do think that C++ should, at some future time, create reflection metadata and I am aware that there has been a C++ standard working group for C++ reflection, but I have not followed what they have done. I vote to ACCEPT the library into Boost.