Re:Syntax Matters...?
by barrkel on Monday April 16, 2012 @12:21PM
(#3847991)
Anonymous classes use lexical closure to capture names in the outer environment. The feature that Java lacks is not so much closures, as first class functions (which you can have without closures). Defining a method which binds to lexically enclosing symbols, and when evaluated has access to an environment mapping these symbols to values, seems to me to be possible in Java. It's just that the method needs to be contained in a class.
[ Parent
| on HN ]
There are no comments on this comment yet.