From: Eric Niebler (eric_at_[hidden])
Date: 2004-04-21 10:12:45
Daniel Wallin wrote:
> xxx::for_each(cont, _1 += 2);
> IMO C++ isn't missing a loop construct, it's missing a lambda construct.
IMO, C++ is missing a foreach construct *and* a lambda construct. :-)
When the loop body is non-trivial, writing it as a lambda would make the
code hard to follow. I shudder at the thought of a lambda that takes up
more than a few lines. A foreach construct would make it easier to read,
in that case.
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk