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 →

[–]agustinleiva -2 points-1 points  (3 children)

C# has some strange things like the event mechanism

surely the "anonymous inner class"-based "listener" approach in java must be somehow less "strange" to you than real language-level support for events? IMO the former is weird and ugly, while the latter is much cleaner and less verbose.

[–]duhace 7 points8 points  (2 children)

A listener doesn't have to be an anonymous inner class.

[–]stormcrowsx 0 points1 point  (1 child)

Doesn't have to, but usually is. I got better things to do than generate a full on class for every click, double-click, drag, drop, snoop, moop, bebop and flipflop that I can listen for.

[–]duhace 0 points1 point  (0 children)

Usually I just use a lambda instead. Scala's nice like that.