4 ms·
IIRC, the limitations on lambdas has to do with the way whitespace is parsed rather than being an explicitly conscious decision.
by LyndsySimon 10y ago
IIRC, the limitations on lambdas has to do with the way whitespace is parsed rather than being an explicitly conscious decision.
- andybak 10y agoGuido also maintains that by the time you need multiline lambda's, the extra cost of giving the function a name is more than outweighed by the improved readability. I kinda agree. Certainly it guards against some of the code you see in overly nested javascript. The downside is that the code is slightly removed from it's call site - but rarely by much. Overall the increased complexity it would bring to the language has not been justified by anyone arguing for it's benefits. Giving the function a name isn't the worst thing in the world.