Re:Java finally getting closures, method handles and traits ...
by ebiester on Sunday January 23, 2011 @07:01PM
(#2133722)
Undoubtedly, there will be maintenance projects that will develop this attitude, the places I've worked usually took a while to move to a new version, but once they moved they had no problem integrating the new features.
Essentially, this will replace the horrible callback syntax we have and have been using for a while. The new features will be integrated slowly, but they will be used.
As an aside, I think that the complexity of the language is already getting out of hand. Although features like this can be found in "little" languages like Javascript, they were in from the beginning and form part of the language's substrate. Libraries, frameworks, everything a Javascript user touches will make use of anonymous functions with lexical scope. More complex features are built on these features. This matters because when a programmer learns how a function works in Javascript, he learns how everything works.
Whereas when adding the same feature to Java, it's just being bolted on the side. So when a programmer learns how these new so-called closures work, all he learns is about a feature that isn't being used as a component of anything else, it's just a feature. We add complexity but get very little in return, much less than from the same feature in a language like Javascript.
I am not trying to get into a flame-fest over Java, but I do think that there comes a time when any product matures, and "improvements" should be viewed with extreme caution because the product has reached a point of greatly diminishing returns. I suggest that Java is in that place.