Boost logo

Boost :

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

Boost list run by bdawes at, gregod at, cpdaniel at, john at