Java 7 闭包语法
我下载了最后一个 Java 版本 b96-Feature Complete 用于测试新的 JDK 功能 但我不知道使用哪种语法来测试闭包!
我可以测试一下吗?
哪种语法在最终版本中已获得批准?
I download the last Java build b96- Feature Complete for testing the new JDK features
but I can't figure out which syntax using for testing closures!
Can I test it?
Which syntax has been approved in the final release?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不能确定,但我认为这个语法:
将按照 http 完成://docs.google.com/Doc?id=ddhp95vd_0f7mcns
I can't be certain, but I think this syntax:
Is going to make it through as per http://docs.google.com/Doc?id=ddhp95vd_0f7mcns
为了回答你的问题,最终的语法尚未获得批准,尽管 M8 被列为功能完整的里程碑,但它并不具备所有建议的功能。您可以在此处阅读有关当前形式的该功能的信息,但很多讨论是现在还在继续,还有很长的路要走。此外,一旦解决了更紧迫的问题,语法将被重新审视,并可能在以后进行更改(至少是一些更改)。
此外,project-lambda 代码正在主线的 fork 中进行处理JDK7(我相信),所以我认为它不会出现在您下载的版本中。
To answer your question, no final syntax has been approved and, despite M8 being listed as the feature-complete milestone, it doesn't have all the proposed features. You can read here about the feature in its current form, but much discussion is going on now and it has quite a ways to go. Additionally, the syntax is going to be revisited and likely changed (at least some) later, once more pressing issues are worked out.
Also, project-lambda code is being worked on in a fork of the main line JDK7 (I believe), so I don't think any of it would be in the build you downloaded.