The Source for Java Technology Collaboration
User: Password:



Start New Message Post a Reply

Subject:  Some good changes others bad
Date:  2007-08-17 04:35:55
From:  aehrenr
Response to: Some good changes others bad


Can you really argue that creating a closure is more complicated than creating an anonymous inner classes? Try to explain to a garden variety Java developer why variables outside an inner class have to be declared final and watch his eyes glaze over. Inner classes are far more esoteric than closures.

You are correct. I would have also prefered closures. The specification of inner classes should have been thought about much more careful. They are beside many apects of Generics a good example that one should think very careful on language additions. But now things are like they are and I think it is even more confusing to have several dissimilar ways of formulating the same thing after addition of closures. In my private optinion a version of the language should be defined that is slightly incompatible with the current but that fixes the accumulated problems with inner classes, Generics, the way properties are written and so on (just like Python is going to manage it). Then Java could improve and stay a consistent and hand tool.


 Feed java.net RSS Feeds