Boost logo

Boost :

Subject: Re: [boost] [local] Help for the Alternatives section
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2011-05-01 19:03:04


On Sun, May 1, 2011 at 6:46 PM, Mathias Gaunard
<mathias.gaunard_at_[hidden]> wrote:
> On 26/03/2011 23:19, Lorenzo Caminiti wrote:
>>
>> Hello all,
>>
>> I am updating Boost.Local docs and I could use a some help in getting
>> the Alternatives section right
>>
>> http://svn.boost.org/svn/boost/sandbox/local/libs/local/doc/html/boost_local/Alternatives.html
>
> It's missing a few advantages of Boost.Phoenix-like approaches:

I did try to list these aspects in the comparison table at the
beginning of the Alternatives section. Please let me know if it is not
clear enough.

>  - can happen at the expression level and not just statement level. This
> also means the function does not necessarily need to be named.

This is captured under "Can be defined within expressions". I can add
the function naming issue.

>  - does not require listing all variables to bind from the scope

This is captured under "Bind variables in scope" that for Boost.Lambda
reads "No (but variables in scope are accessible as usual within
expressions)." and for Boost.Phoenix the same plus "Yes (using let
which also allows to bind by constant reference)."

>  - can be quite more concise for simple tasks.

I think this is arguable but I am providing code examples (actually of
simple local functions) so users can judge on their own.

> There is also the polymorphism thing: functions generated by Boost.Local are
> necessarily monomorphic, unlike Boost.Phoenix and global functors.

Do you have a reference for this--like a WiKi page. I don't understand
this topic and I'd need to study it more before adding to the docs.
Thanks a lot.

-- 
Lorenzo

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk