News for hackers. Stuff that matters.
Re:Java finally getting closures, method handles and traits ... by Sandman on Sunday January 23, 2011 @04:34PM (#2133390)
Why wouldn't they use closures and other new stuff in Java? It's the same like it was with generics - prior to 1.5 we used raw types with casting, but when generics were introduced we started using them instead. When you encounter some older code in your codebase that still uses raw types instead of generics, you just rewrite that portion of code. No problem with that.

I mean, couldn't your point be made about any language that introduces new features? When that happens, do developers decide to rewrite the entire codebase? I don't think so.

Re:Java finally getting closures, method handles and traits ... by TeHCrAzY on Sunday January 23, 2011 @05:23PM (#2133493)
Do you really rewrite working and tested code just to use new or more convenient features of the language? I don't see that being a good option, nor one that most developers would take.
Re:Java finally getting closures, method handles and traits ... by Sandman on Sunday January 23, 2011 @05:33PM (#2133523)
If your code is covered with tests, why would you be afraid of rewriting it?
Re:Java finally getting closures, method handles and traits ... by fizx on Sunday January 23, 2011 @06:54PM (#2133702)
Hah!
Re:Java finally getting closures, method handles and traits ... by jabits on Sunday January 23, 2011 @11:18PM (#2134231)
You bet! Every chance I get. If I am in a section of code for some sort of change, I will definitely take the opportunity to update/improve the current state of affairs. Doesn't mean you need to go through and rewrite the entire thing.

For example, a recent requirement of mine was to revise some xml processing to create sitemaps. As part of the changes, I rewrote the logic to use xml LINQ (c#) and the resulting function is much cleaner, and will be easier to maintain going forward.

It also makes routine maintenance changes more palatable.

Re:Java finally getting closures, method handles and traits ... by gnaritas on Sunday January 23, 2011 @05:37PM (#2133529)
If the semantics are identical, you don't need to rewrite them, a good IDE will do that for you with a simple code reformat whenever you happen to be doing work in that file.