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

Aleksey Gurtovoy wrote:

> Joel de Guzman wrote:
> 
>>>>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?
> 
> 
> We can easily have both. Or 'outer(arg1)' as a synonym for 'outer<1>(arg1)',
> and "numbered" versions only for greater scopes.

Can you do that? Or do you mean outer<>(arg1)?

Perhaps we can elide the <N> since, I imagine, practically, only a
few outer scopes, say, 1..10 are needed:

     outer(_1)
     outer2(_1) == outer(outer(_1))
     outer3(_1) == outer(outer(outer(_1)))

??

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