Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Functional Programming in Java: Is it cover all features of Java8?  RSS feed

 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pierre-Yves Saumont, Is this book cover all the feature of Java 8? Also any test practice and project available..
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66184
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is clear from the book's title and the posted Table of Contents that it focuses on the functional aspects of Java 8.
 
Pierre-Yves Saumont
Author
Ranch Hand
Posts: 155
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The book is NOT a book about Java 8. It does not talk at all about the Java 8 features that are not related to functional programming. It makes heavy use of lambdas and method references, as well as functional interfaces (mostly implicitly) and default methods.

The book does not use the (somewhat) functional constructs like Optional and Stream. For Optional, this is because this class is not very useful since it can't carry the cause of the absence of data it is supposed to represent. So it might be suitable to represent truly optional data, but not data that is missing as the result of an error.

Java 8 streams are not used neither because they are more oriented toward automatic parallel processing that functional programming. There will be a chapter however about these constructs, and how they are different from those we build in the book

Standard Java functions are not used, but they could be. One may replace the Function class we build with the Java 8 Function since they are pretty much identical. However, the book do not talk about the 30+ (or is it 40+ ?) functions that Java 8 defines, because they are mostly useless. (I mean in the context of the book!) In the book, I use only Function<T, U>, and that's it. All functions are in curried form.

But be sure that most of what you will learn in the book will however be useful for Java 8 programming.

Pierre-Yves
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!