
[mailto:boost-bounces@lists.boost.org] On Behalf Of Peter Dimov I was looking at the lambda papers recently and I came to the conclusion that what we actually need is local functions. To pick an example from N1958:
I would like local functions in addition to lambda's as well. There is a very old paper that proposed it. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1993/ X3J16/93-0088 WG21/N0295 [PS] [PDF] A proposal for Nested Functions John Max Skaller & Fergus Henderson It's a slightly different need though than the current C++ lambdas. The main difference is that with the current library lambda implementations you by default get access to all of the surrounding function's local variables mentioned in the lambda statement. With a nested function you have to bring them in via arguments etc. It's still a nice feature and you should check out this paper. -Gary-