TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Demystifying C++ lambdas

28 pointsby SirOibafover 10 years ago

2 comments

cousin_itover 10 years ago
&gt; <i>Basically, lambdas are syntactic sugar, designed to reduce a lot of the work required in creating ad-hoc functor classes.</i><p>Abstraction inversion. Lambda is a much simpler idea than all this C++ stuff used to explain it. Languages should have lambda first, and bullshit like &quot;functor classes&quot; second, if at all.
评论 #8209334 未加载
评论 #8209426 未加载
评论 #8209326 未加载
zschocheover 10 years ago
In most cases, lambdas are rvalues. That can have an impact on its scope and lifetime.