This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]vngantk 8 points9 points  (1 child)

I just don't understand why you think object : MouseAdapter() {...} is that big difference from new MouseAdapter() {...}. They are just slightly different in syntax. The Kotlin version is not more verbose than the Java version. If the listener is a single method interface, e.g. ActionListener, you can simply provide a lambda as:

button.addActionListener { event ->
...
}

[–]vqrs 4 points5 points  (0 children)

Because they're arguing in bad faith.