4 ms·
That seems like an argument against lambda functions in general - why use lambdas when you can define a static function for every case? Well, the answer in my o
by nawitus 10y ago
That seems like an argument against lambda functions in general - why use lambdas when you can define a static function for every case? Well, the answer in my opinion is because it makes code more readable if you can define a simple lambda function instead of having to name every single function in the code base.
- brianwawok 10y agoWell if you are going to reuse the function, name it. If it is a 1 time thing, use a lambda.
- quietwhisper 10y agoSounds great in theory. Problem is if you need a lambda that isn't a single expression, you then have to name it. Welcome to the conversation.