闭包和 lambda 之间的区别?
可能的重复:
“闭包”和“闭包”之间有什么区别拉姆达'?
你好,世界!
如果这有点新手,请原谅我,但每个人总是对它有计算机科学知识。
lambda 到底是什么?什么是闭包?
据我了解,lambda 是一个匿名函数,而闭包是指向 lambda 父作用域的变量的指针..(就像声明它的函数的变量的快照)
这有多正确?
谢谢
丹尼尔
Possible Duplicate:
What is the difference between a 'closure' and a 'lambda'?
Hello, World!
Forgive me if this is a tad of a newb q, but everyone always gets computersciencey about it..
What actually is a lambda? And what is a Closure?
As far as I understand a lambda is an anonymous function and a closure is a pointer to the variables of a lambdas parent scope.. (like a snapshot of the variables of the function it was declared in)
How correct is this?
Thanks
Daniel
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是完全正确的。术语“闭包”描述了范围事物,术语“lambda”将整个函数描述为一个对象事物。
That is totally correct. The term closure is describing the scope thing, the term lambda is describing the whole function as an object thing.