The Source for Java Technology Collaboration
User: Password:



Start New Message Post a Reply

Subject:  Its just a contributory factor to complexity than a language feature in Java
Date:  2006-08-25 22:26:47
From:  endlesslove


Isn't closure simulated through inner classes?

There's a pro java closure argument that says inner classes can't use a local variable unless it is final, so we need to add closure in the Java language. But does it hurt to make that variable an instance variable so the innerclass can access it, as what everyone has been doing? If you say it doesn't hurt but it's just ugly, I'll say, for me it's beautiful. If you say it's hard to type, I say, for me it's easier. If you say it's harder to read an innerclass than closure syntax, for me it's not.

If the Java language will evolve just because of some people's laziness to type and their own views of aesthetics, how about those programmers that value consistency and simplicity of the Java Language?

Please add something to the Java Language if that 'something' is so valuable and unavoidable, for the sake of simplicity and consistency.

(Please don't counter-argue and tell me to go back to assembly or C. I also like evolution in the language as long as it is towards the better.)

 Feed java.net RSS Feeds