Jan Goyvaerts wrote:The Java 8 lambda's and streams are introducing a newer - and better - usage of collections.
Two years ago we switched to a polyglot programming (Java & Scala) because we write a lot of data processing code. Lots of iterating, filtering, intersecting, ....
However, we are not fully committed to Scala perse. From a tooling perspective and learning curve it's always better to have one language instead of a bunch of them.
In your opinion would it be worth reverting again ? A good reason would be the amount of data processing coding is now comparable to Scala. Or any other reason maybe ?
Thanks !
Hi Jan,
I would happily use Java instead of Scala for writing that kind of code with Java 8. Previously I think Scala would have had an advantage. If I were in your shoes of thinking about reverting I would do the following:
1. Evaluate how well your tooling works in Java 8. Some things (libraries, IDEs etc.) may not work yet and it would be worth waiting until you get the full on Java experience with Java 8 before upgrading.
2. Figure out what pain points you have with Scala. Is it slow compile times and broken tooling? If so then its likely that Java 8 will help. If there are other issues then a change of language may not be so valuable.
3. Are you using other Scala language features that you would miss if you moved back to Java? (For example case classes, immutable collections, etc.)
4. Prototype. This is so important when considering this kind of change and its something that people often fail to do. Try spending a bit of time porting some of your Scala code to Java 8 and see what happens. I know it may be hard to justify spending time on prototyping, but it genuinely does reduce the risks associated with change and help your understanding of the problem space.
regards,
Richard