LoudNPossiblyWrong LoudNPossiblyWrong - 1 month ago 10
C++ Question

What is the motivation behind C++11 lambda expressions?

I am trying to find out if there is an actual computational benefit to using lambda expressions in C++, namely "this code compiles/runs faster/slower because we use lambda expressions" or is it just a neat development perk open for abuse by poor coders trying to look cool?

I understand this question may seem subjective, but I would much appreciate the opinion of the community on this matter.

Answer

I don't think it's nearly as much about the computational performance as increasing the expressive power of the language.