Java has functions, it doesn't have "first class functions" where functions are treated as objects.
That's not necessary for closures. A closure is when you define a function that closes over the variable scope of the defining environment. You can do that in Java with anonymous classes that wrap defined functions. On Sep 12, 2:37 pm, Kevin Wright <[email protected]> wrote: > In order to have closures, you must first have functions (as per your > definition). Functions being first-class entities that can be freely passed > around. > > Java doesn't have functions, therefore it can't have closures. -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
