People don't use closures in Java that much? I emphatically disagree.
I completed writing a JavaFX 2 application in Java: Every single
button handler or GUI event handler uses an anonymous class wrapped
around a function, and most of those access local or instance
variables from the defining scope, where my coworkers and I refer to
it as a closure. The Swing and GWT APIs are also designed for heavy
use of anonymous functions and closures (most Java server side web
frameworks don't use anonymous functions at all). We also do the same
thing in our (non Java) JavaScript client code and we call them
closures there as well.

No, I'm really not being pedantic. I use closures so extensively in
Java, it is ridiculous to say that they don't exist. That's like
telling me Java doesn't have a for loop or exceptions.

On Sep 12, 8:47 pm, phil swenson <[email protected]> wrote:
> http://en.wikipedia.org/wiki/Pedantic
>
> Java doesn't have closures in the way most people think of closures.
> It has closures in a half-assed, un-friendly way.  So people don't use
> them much and in effect, Java doesn'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.

Reply via email to