Re:Demystifying C++ lambdas
by emsy on Thursday August 21, 2014 @04:15PM
(#8209334)
I disagree. It's easier to comprehend the scope and lifetime of bound variables and lambdas if you already know them from normal objects. I had a hard time to grasp the lifetime of my lambdas and how the variables were bound, stored and passed to a function.
Of course, C++ is hugely impacted by its legacy burden. Any newer language would probably do it in a simpler way. Still, the fact that lambdas and objects use the same scope makes things much easier to understand remember.
Of course, C++ is hugely impacted by its legacy burden. Any newer language would probably do it in a simpler way. Still, the fact that lambdas and objects use the same scope makes things much easier to understand remember.