ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] Lambda library - comparison with FACT and other solutions?
by Peter Dimov other posts by this author
Mar 18 2002 1:24PM messages near this date
Re: [boost] Re: Review: lambda library | is_class
From: <nbecker@[...]..> 
>  I haven't look at any of the technical issues, but from a purely
>  esthetic view I prefer the familiar, explicit lambda(x, y, x + y) .

Sometimes the choice is not so clear-cut.

std::for_each(v.begin(), v.end(), std::cout << _1 << '\n');

vs

std::for_each(v.begin(), v.end(), lambda(x, std::cout << x << '\n'));

In general, I find that every non-pure-functional use looks better with the
_N syntax; lambda() implies a pure function as far as I'm concerned.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved