logoalt Hacker News

lpribisyesterday at 9:55 PM2 repliesview on HN

Sure, but in that case they are equivalent to a static function so there's no benefit of lambda other than syntax sugar.


Replies

moxxymillertoday at 6:48 AM

Capturing lambdas in a language without a GC (or a borrow checker) are kinda fraught with footguns.

6yyyyyyyesterday at 11:33 PM

The benefit is that you don't have to solve one of the hard problems in computer science (naming things).