r/ProgrammerHumor • • 16d ago

Meme makesMeFeelSmart

Post image
5.4k Upvotes

160 comments sorted by

View all comments

Show parent comment

1

u/Rin-Tohsaka-is-hot 14d 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.