Boost logo

Boost :

Subject: Re: [boost] Case study: Boost.Local versus Boost.Phoenix
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2011-02-05 15:23:05

On Thu, Feb 3, 2011 at 9:36 PM, Gregory Crosswhite
<gcross_at_[hidden]> wrote:
> In conclusion, I have found that Boost.Phoenix is simply too painful to use
> in practice for most cases where I have been using Boost.Local.  Although it
> could potentially allow for very elegant code in many cases, it is so hard
> to figure out what you are doing wrong that it seems to be more trouble than
> it is worth.  I am actually a little sad at having arrived at this
> conclusion, because the library looked incredibly cool and I was very
> excited about trying it out, and now I am just walking away from the whole
> experience feeling incredibly frustrated.  Furthermore, even if I were an
> expert in it I have trouble seeing how in most of the places in my code it
> would result in code that was either more clear or easier to write.  The
> Boost.Local code has extra noise at the beginning, but when the main body of
> the nested function contains lots of calls it is far more expressive to
> write the C++ code directly than to use lots of pheonix::bind functions to
> accomplish the same thing.
> This doesn't mean that I think that Boost.Phoenix is a bad library.  Reading
> through the documentation I am absolutely amazed at how it can be used to
> create very expressive functions;  the authors have clearly worked very hard
> on it and should be proud of their work.  However, it simply cannot be
> treated as invaliding the need for something like Boost.Local, because for
> one to accomplish many of the same tasks in Boost.Phoenix as one can
> accomplish in Boost.Local one has to deal with a whole lot of extra mental
> effort and frustration, and the result at the end is often less expressive
> and clear (and potentially less maintainable) as it would have been if one
> had used Boost.Local since the body is no longer expressed in standard C++.
> I hope that you all find this informative!

Indeed, very informative for me. (I only hope my library is helping
you enough to justify the time you spent on this comparison :) .)


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