File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Features new in Java 8 and the fly likes Java 8 collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Features new in Java 8
Bookmark "Java 8 collections" Watch "Java 8 collections" New topic
Author

Java 8 collections

Jan Goyvaerts
Ranch Hand

Joined: Feb 08, 2011
Posts: 32
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 !
Richard Warburton
Author
Greenhorn

Joined: Jun 16, 2013
Posts: 22
    
    7
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java 8 collections
 
Similar Threads
Why Some of important java 8 features are not included in java 8 in action
Java 8 in Action: Immutable Collections in Java8 SDK?
What's Clojure's best usage ?
Java 8: What are the good features you will advise to use?
DSLs - when?