• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New Java 8 Features: Which will be the easiest useful feature?

 
Duncan MacFarland
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Richard,

Java 8 has a lot of new features that I don't know anything about, like Lambda expressions or functional programming. The latter of these two sound like Oracle has made Java non-OO if one wishes to code non-OO in Java. Is that a correct assessment?

My primary question is about what is in Java 8 for someone unfamiliar with the complex new things being added. What will I find most useful for basic "Model" programming, processing data on the back end that won't require a big learning curve just to understand them, let alone use them well?

I read your reply to another post related to what is happening to Java. I have been wondering since Java 5 if the JCP is essentially trying to make Java Java+every feature I ever liked in another language? Thanks.

Duncan


 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What will I find most useful for basic "Model" programming, processing data on the back end that won't require a big learning curve just to understand them, let alone use them well?

You might want to look at the new Date API introduced in Java 8 http://docs.oracle.com/javase/8/docs/technotes/guides/datetime/index.html.
 
Richard Reese
author
Ranch Hand
Posts: 84
5
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duncan,

The addition of new features to Java 8 does not encourage using non-OO techniques. For example, lambda expressions complement OO programming. They are based on anonymous inner classes.

Most of the new Java 8 features are tied to lambda expressions one way or another. Pai’s recommendation is a good one since the Date API is not as dependent on lambda expressions.

With regards to Java enhancements since Java 1.5, I don’t believe they are adding features just to add features. They are driven by Java community recommendations and other language developments. Of course developments like LINQ impact Java’s direction.

 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most enhancements have been driven by community pressure.
The use of a λ where one would have used an anonymous class of an interface with one method is interesting. The MyApp$1.class files are no longer to be seen. Not only do you save something like 7 lines of code, but you also save a file, since the anonymous object is no longer necessary.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic