News for hackers. Stuff that matters.
Re:Joel Spolsky: Can your programming language do this? by cynicalkane on Saturday April 23, 2011 @11:12AM (#2476940)
Anonymous inner classes in Java actually are closures. The compiler will force you to declare any closed-over local variables as final. Like everything else in Java, it's verbose but it works. The problems with using closures in Java is that the type system doesn't play well with function objects and that the standard library doesn't care about functional programming, and it's really only the former that is stopping you from functional programming in Java.

There are no comments on this comment yet.