1 Feb 2008 01:45
Re: Relationship of Lambda and Phoenix
Joel de Guzman <joel <at> boost-consulting.com>
2008-02-01 00:45:36 GMT
2008-02-01 00:45:36 GMT
Scott Meyers wrote: > At BoostCon 2007, I was told that the functionality of Boost.Lambda was > essentially present via Phoenix in Boost.Spirit. From what I can tell, both > Lambda and Spirit/Phoenix will be present in 1.35, leading me to wonder what > advice to give people who are interested in experimenting with the use of lambda > functions in Boost. Are people to be encouraged to use Phoenix over Lambda, or > are there features in Lambda that Phoenix doesn't have? > > I'll be giving an overview of some Boost libraries at the Software Development > conference in March, and I'll be showing some examples of Lambda. If I should > be telling people to use Phoenix for future work, I'd like to know that. It's interesting to note that Dave asked me a similar question: "If I were going to teach practical functional programming in C++, should I teach people Boost.Phoenix instead of Boost.Lambda? If so, why? " Here's my answer. It seems that it should answer yours? : In the context of Boost, I'd say it's better to teach Lambda as it is the official Boost library. Phoenix has some additional features beyond Lambda's so perhaps a short delve into those, in the context of the pending merger, will be good. All of current Lambda's API and all tests will be assimilated in the merger, so there's no fear that something will go away and be obsolete. Here's a short list of features in phoenix beyond lambda: * Lazy Functions (http://tinyurl.com/yvjo7p) makes it easy to adapt bindable polymorphic function objects. This, IMO, is crucial in writing extensive generic lazy function libraries.(Continue reading)
RSS Feed