Louis Dionne
[...]
I am currently going through Metaparse's tutorial, and here are some questions and comments I have so far. I will be posting more questions by replying to this message if some come up as I progress through the tutorial. I will provide a proper review of the library when I'm done.
What follows is my official review of the Metaparse library ----------------------------------------------------------- I vote YES for the acceptation of Metaparse into Boost.
- What is your evaluation of the design?
I think the design is fine. Not an expert, but it looks like a classic parser combinator library, except the author had to deal with the quirks of C++ template metaprogramming. It is built using the well known and proven concepts established by the MPL: metafunctions, metafunction classes and type-level sequences, which is a safe bet. That being said, I would be really really curious to try and implement something similar with value-level syntax, similarly to the way Hana does compile-time computations with a value-level syntax. I think we might be able to achieve something with the same syntax as Spirit but for building compile-time parsers too. However, this is just my own curiosity speaking and it does not take anything away from Metaparse.
- What is your evaluation of the implementation?
I have not looked at the implementation in depth, but I think the author pretty much pushed C++03 to its limits. The only comment I would have would be to provide a modernized version of the MPLLIBS_STRING macro when the compiler supports it, because that is a huge bottleneck for using the library.
- What is your evaluation of the documentation?
Despite the concerns I raised in my other messages, I think the tutorial is very well written and is very instructive. I think it covers the necessary material to get started and I think it manages to do so quickly enough. The reference is simple but well organized and easy to read. There are usage examples for every component I looked at, which is really useful.
- What is your evaluation of the potential usefulness of the library?
I think the library can be useful, but it is obviously targeted towards library writers rather than application developers. I think Metaparse plays in the same field as Proto; they are "meta" libraries used to build other libraries.
- Did you try to use the library? - With what compiler? - Did you have any problems?
Yes. I cloned the mpllibs/ repository and was able to build it using the CMake-based build system. I built/ran all the unit tests and the examples with the following compilers: Clang 3.4.2, 3.5.2, 3.6.1, trunk GCC 5.1, trunk Everything went fine, except for a link error due to Boost.Test with C++14 compilers, but I don't think that's Metaparse's fault. I was building against Boost 1.58. The whole process was very easy; it took me under 5 minutes to set it up. I did not try to use the Boost.Build system.
- How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?
I read all the "Getting Started" part of the documentation, and I had a look at the reference too. I looked a bit at the implementation itself, but not for very long. I played with the final calculator example on my own machine for about an hour or so. All in all, I would say I have spent +6h on this review.
- Are you knowledgeable about the problem domain?
I have used Spirit and other "parser generators" in the past, so I am familiar to the domain of parsing. I have used Proto, MPL, Fusion and I have written the MPL11 and Hana libraries, so I have a good knowledge of the domain of metaprogramming. Regards, Louis