4 ms·
> any example using a lambda in C++ I find to be 10,000× worse than the functional equivalent. > I naïvely assumed that the keyword `lambda' was involved. I d
by lbrandy 11y ago
> any example using a lambda in C++ I find to be 10,000× worse than the functional equivalent.
> I naïvely assumed that the keyword `lambda' was involved.
I don't understand how this two sentences co-exist. If you are unfamiliar with the syntax, surely you can't have a well informed opinion on which usage, in practice, turns out better?
I am assuming "functional equivalent" means the old named functors of C++03. And yea, you are likely super alone on that opinion. I normally say lambdas in C++11 mostly-obsolete (at least as the default) a huge class of the old ways from functors to bind/placeholders and friends. I don't think I've ever heard someone pining for the ol' days on this one.
- xigency 11y agoSuper alone. I don't generally use STL so I mean without language extensions. It's easy enough to implement these things with traditional function pointers.