Boost logo

Boost :

Subject: Re: [boost] Interesting article on stack-based TMP
From: Patrick Bene (pubbybene_at_[hidden])
Date: 2012-10-22 14:09:21

I'm the author that article and it's coincidental that I was actually
thinking about gauging interest here about the library implementation
of it that I'm working on. The library is coming along great and has
support for C++03, full continuations, and Boost.MPL wrapper words. If
there's sufficient interest I'll consider submitting it for formal
review when I'm done.

> It looks like TMP made easy (finally !)

"Easy" is not the correct word, but "easier" is absolutely true.

> While I'm a fan of point-free programming, I think it the that
> comparison is not completely fair; if you allow c++11 template using
> syntax, then the classic MPL metafunction notation becomes:
> template<typename Predicate, typename List>
> struct foo: add<square<length<filter<Predicate, List>>>>, int_<5>>{};
> Which is almost as good as the concatenative version. The extra <>
> noise is annoying in this case, but in the general case where the
> syntax tree is more complex, the classic MPL version would actually be
> more readable.

You're correct, it's not a fair comparison; however, there are two
additional points to consider:

- 'using' syntax is a huge syntactical improvement, although from what
I understand it cannot be used in higher-order metafunctions without
some additional boilerplate. Not really a problem for a library though
- I'd love to see Boost.MPL updated to support C++11.

- Functional TMP unfortunately lacks the infix operators found in many
other functional languages and thus -loses a lot of their readability.

(Hopefully I sent this email correctly, I'm unfamiliar with mailing lists)


Boost list run by bdawes at, gregod at, cpdaniel at, john at