Re:C++0x (upcoming C++ standard, includes lambda functions)
by makmanalp on Wednesday August 11, 2010 @05:33PM
(#1596223)
I guess by making the closure explicit they've made implementing them much easier too. The problem of trying to figure out which variables the function is closed over is no longer there (which makes me curious because judging from my own experience in creating a scheme-clone, this wasn't that difficult). I bet it just transforms down into a function or maybe even gets inlined.
You can "explicitly" pass all variables in the containing scope with [=] or [&], so it's more of an optional annotation than a requirement.