From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-07-29 22:18:42
Eric Friedman wrote:
> Below is my formal review for the Boost MPL Library:
> __Library Design__
> On the whole, I find MPL to exhibit an astonishingly high
> level of design; from lambda/bind expressions to familiar
> STL-like algorithms, MPL exposes a great amount of power
> through a consistent and highly reusable interface.
> Overally, I applaud Aleksey for his crafting of MPL's
> One facility sorely missing is an mpl::is_sequence query
> metafunction. The ability to query an arbitrary type T to
> determine whether it is an MPL-compatible sequence will be
> of utmost importance in creating flexible class templates.
> For example, the desired semantics for the under-development
> boost::variant is to allow a simulated variadic template
> parameter list *or* a single MPL-sequence. That is to allow
> both of the following to exist as valid declarations,
> typedef boost::variant<int,double,std::string> my_variant;
> typedef mpl::list<int,double,std::string> types;
> typedef boost::variant< types > my_variant;
> Such an 'overloaded' interface cannot be implemented without
> a mpl::is_sequence facility. I discussed the inclusion of
> this facility with Aleksey some weeks ago, but I have not
> yet seen its appearance in the library; it is vital,
> however, that it eventually appears.
In one or another form, it will. I just didn't have time to think it
> __Library Documentation__
> MPL's documentation seems to be the shoddiest part of the
> library. This is not to say that it is *bad* -- as that is
> far from being the case -- but I feel the following changes
> should be made.
> MPL has a steep learning curve. I have been using various
> version of MPL for the past 6 months, so I am largely past
> this curve, but I fear for new users of the library.
> Primarily, I think more examples should be provided in the
> tutorial, paper, and reference documentation. Currently the
> first is limited to simple explanations of mpl::if_ and
> mpl::apply_if, the second to somewhat obscure applications
> of MPL,
I protest, FSMs are not obscure! ;).
> and the last to near-trivial uses of the various
> algorithms, metafunctions, etc. While I understand that good
> documentation is hard to write, and I therefore understand
> while it has been long in the coming, I think it will be
> important for MPL's ultimate success in Boost.
I am determined to improve the volume and quality of the documentation over
time. However, I think that current state is up to the Boost standards
(among the official, relatively large libraries, there are very few that
cover things more thoroughly). It's not an excuse, just a reminder ;).
> For those who need to do template metaprogramming, MPL will
> serve invaluable. Before using MPL, I did extensive
> metaprogramming work without it. There is no way I would
> consider going back to my pre-MPL days <g>.
> I wholeheartedly vote for formal acceptance of MPL into
> Boost (with the hope that my nits, particularly regarding
> mpl::is_sequence, will be heard and eventually addressed).
Thank you for your comments,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk