What’s the current state of closures in Java?

前端 未结 6 973
夕颜
夕颜 2020-12-10 11:41

Does anybody know, if closures will be in Java 7?

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 12:10

    Groovy is the best Java alternative I've seen that includes features of dynamic languages including closures, run-time class extension, etc. While Ruby has a slight design advantage imho, I'd have to say the fact that Groovy compiles into Java byte-code and interacts with Java without ANY interface code is a huge plus that can't be ignored.

    http://groovy.codehaus.org

提交回复
热议问题