News for hackers. Stuff that matters.
Re:"Should I still learn Java?" Answered: Yes. by maweaver on Friday January 14, 2011 @02:22PM (#2105015)
> It's bad enough that passing a small fn (1 line of code in a decent language), requires a separate class and 20 lines of code in Java.

No need to exaggerate, it's only a few extra lines

    functionTakingCallback(new Callback() {
        public void fn() {
            ...
        }});
I agree it's verbose enough to be annoying, but hardly a deal-breaker imho.

EDIT: Just occurred to me that you might be looking at it from the other side, where you would have to define the callback class. Still, defining a static nested with a single function is only 3 lines of code.

There are no comments on this comment yet.