Why Java doesn't support method references ?

My main source of concern is how unellegant the code for handling gui events looks.

At first Java came up with inner classes to support event handling, later it was anonymous inner classes. Hell, isn't it clearer writting :

frame.addWindowListener(WindowClosing() );

public void windowClosing(WindowEvent e) {

System.exit(0);

}

than writting

frame.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent e) {

System.exit(0);

}

});

[529 byte] By [armando_de_la_torrea] at [2007-11-26 15:31:12]
# 1
Either way, your code would be a lot more readable if you used [code] and [/code] tags.
tschodta at 2007-7-8 21:48:03 > top of Java-index,Developer Tools,Java Compiler...
# 2
function pointers in any language that supports them are an invitation to disastrous, unmaintainable code that's impossible to predict or debug.I've written it in the past, it was ugly to say the least.
jwentinga at 2007-7-8 21:48:03 > top of Java-index,Developer Tools,Java Compiler...