3 ms·
Lambdas are actually just a nice way to write functions/function objects without polluting the scope. I guess a compiler have no such problems. Immutable meth
by palunon 10y ago
Lambdas are actually just a nice way to write functions/function objects without polluting the scope.
I guess a compiler have no such problems.
Immutable methods are the same thing as a safety check for humans. As you want to check for these things anyway (since you probably don't want errors to come from the c++ compiler), they don't add value.
(AFAIK, they may trigger optimizations, but so does passing const parameters to a free function, which is the C equivalent)