Subject: Re: phoenix lambda-lambda for_each example
From: Joel de Guzman <[email-masked]>
To: Joel de Guzman <[email-masked]>
Cc: Aleksey Gurtovoy <[email-masked]>, Noah Stein <[email-masked]>, David Abrahams <[email-masked]>, Jaakko Jarvi <[email-masked]>
Date: Wed, 03 Mar 2004 19:00:32 +0800

Joel de Guzman wrote:

> Aleksey Gurtovoy wrote:
> 
>> Noah Stein writes:
>>
>>>
>>> I find it a bit noisy, too; however, is there any other solution
>>> that solves a 3-layer (or greater) set of scopes?  Does outer refer
>>> to the immediately preceding scope or the topmost scope?
>>
>>
>>
>> FWIW, I'd expect/implement it to refer to the immediately preceding
>> scope, and support the nested usage like 'outer(outer(arg#))' for the
>> case of multiply-nested scopes.
> 
> 
> Of course. To be clear:
> 
>     arg1 // current scope
>     outer(arg1) // outer scope. 1 scope above
>     outer(outer(arg1)) // 2 scopes above
> 
> << BTW, Noah, let's move to _1 syntax. It's already ubiquitious >>

An alternative syntax is:

     arg1 // current scope
     outer<1>(arg1) // outer scope. 1 scope above
     outer<2>(arg1) // 2 scopes above

Thoughts?

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