Subject: Re: phoenix lambda-lambda for_each example
From: David Abrahams <[email-masked]>
To: Aleksey Gurtovoy <[email-masked]>
Cc: Jaakko Jarvi <[email-masked]>, Joel de Guzman <[email-masked]>, Noah Stein <[email-masked]>
Date: Thu, 04 Mar 2004 08:01:28 -0500

Aleksey Gurtovoy <[email-masked]> writes:

> Jaakko Jarvi writes:
>> One more point...
>> In Joel's suggestion, basically all arguments
>> on parameter slots  expecting  a function object will be
>> interpreted as lambdas. It first seemed a bit scary that this
>> information is only at the defintion of the function that is being
>> called and there is no visual clue at the call site
>> where the boundaries of lambdas are. But after pondering this
>> for a while, it worries me less.
>
> That was basically my reaction, too. 

> It's interesting how compile-time and run-time lambdas differ here: in
> MPL, there is no way to automatically determine the implicit scope:
>

<snip explanation>

I still don't see why compile-time has to be different from runtime in
this regard.  The fold algorithm calls lambda<> on its 3rd argument;
that should be enough to indicate where the scope resides.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com