r/ProgrammerHumor • • 9d ago

Meme makesMeFeelSmart

Post image
5.3k Upvotes

161 comments sorted by

View all comments

Show parent comment

1

u/Rin-Tohsaka-is-hot 8d ago

The compiler can produce more efficient code if the exact type and captured variables of a lambda are known at compile time. Also, a lambda can reference the caller's local variables.