Subject: Re: phoenix lambda-lambda for_each example
From: "Aleksey Gurtovoy" <[email-masked]>
To: "Joel de Guzman" <[email-masked]>
Cc: "Noah Stein" <[email-masked]>, "David Abrahams" <[email-masked]>, "Jaakko Jarvi" <[email-masked]>
Date: Wed, 3 Mar 2004 07:31:15 -0600

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.

--
Aleksey Gurtovoy
MetaCommunications Engineering