
22 Apr
2004
22 Apr
'04
11:10 a.m.
Daniel Wallin <dalwan01@student.umu.se> writes:
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.
But then again, if we had a type inference mechanism and a range library the for-loop is easy enough:
for (auto r = range(v); r; ++r) { }
I would agree that there would be need for a simpler loop head if we had to write every trivial loop on our own, but we have standard algorithms.
And they increasingly implement optimizations like loop unrolling. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com