Boost logo

Boost :

Subject: Re: [boost] phoenix::bind
From: Joel de Guzman (joel_at_[hidden])
Date: 2008-10-03 19:47:21


Steven Watanabe wrote:
> AMDG
>
> Peter Dimov wrote:
>> Eh. How about this one:
>>
>> lambda(_x, _y)[ let. _z = _x + _y, _z * _z ]
>>
>> I think that the implicit let will be much less of an issue in a
>> lambda context than it is in Python (or Javascript), though.
>
> Doesn't that imply that _a, _b, ... have to be enumerated in the
> definition of let?

Not sure I understand.

> I like to have the possibility of defining new local variable names.

Oh sure you can define new names in Phoenix:

     actor<local_variable<Key> >

E.g:

     struct size_key;
     actor<local_variable<size_key> > size;

Is that what you mean?

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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