Gabriel Sechan wrote:
> ----------------------------------------
>   
>> Date: Mon, 7 Jan 2008 01:41:05 -0800
>> From: [EMAIL PROTECTED]
>> To: [email protected]
>> Subject: Re: Introducing Cobra
>>
>> for_each(foo.getBars().begin(), foo.getBars().end(), ....)
>>
>> But a lot of C++ developers strongly resist that idiom, and sometimes
>> the for loop is the cleanest way to represent the work being done.
>>
>>     
> Th problem with for_each is the 3rd argument-  being forced to pass in a 
> function pointer or functor.
...and for that we have boost::bind and boost::lambda. :-)
> Personally I use foreach in perl and not in C++, just due to that.  I'd 
> switch to using it in C++ in a second if that was fixed.
You can thank me later.

--Chris

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to