Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question for Venkat Subramaniam  RSS feed

 
Scott Shipp
Ranch Hand
Posts: 223
12
Eclipse IDE IntelliJ IDE Java Scala Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Mr. Subramaniam thank you for taking the time to answer questions here.

My question is: The examples of functional programming in Java 8 that I've seen almost always deal with collections. I've also started using Scala and found that there is so much more to functional than map/reduce/foreach/etc. Does the book address Java 8 functional programming against other scenarios than taking a collection of data and obtaining a result from it somehow? For example, I understand higher-order functions are possible in Java 8. Is this addressed in the book?
 
Campbell Ritchie
Sheriff
Posts: 55284
156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't have thought that Streams, which is what you describe, actually constitute functional programmin.
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Scott,

Yes, there are a few examples in the book that discuss FP in the context outside of collections. One example is the implementation of execute around method pattern
using lambdas / higher order functions. There are a couple more, like lazy object initialization, to mention another.

Thanks,

Venkat
 
Scott Shipp
Ranch Hand
Posts: 223
12
Eclipse IDE IntelliJ IDE Java Scala Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, again!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!