My travels with Modern Java in Action

Totally agree @iPaul , there has to be general consensus between the developers in which style to adopt. What I am seeing at the moment where I work is the heavy use of the Stream API when working with collections. This gives the developer an API similar to FP patterns, such as map, flatMap, filter & reduce. This feels like a natural step towards a functional style without diving in at the deep end.
In my case, the project has 4 teams, 3 of which are external vendors and it is our team who are behind the curve and struggling with the new concepts. Adapting to the other teams code styles has been a struggle for us but already, for me at least, it has helped me a great deal. You have to swallow your pride when you do not know what you do not know.
So coming back to your point, we are actually the alienated team. We are still trying to catch up but at least now I know what I want my code to look like when I grow up :smiley:

But just to clarify, Java 8 is still fundamentally an OO language with some FP features. We are still writing and thinking in OO. But I am hoping with all these new features and practice I will be able to revisit FP languages like Clojure or Scala with more confidence and a deeper appreciation for the mindset.
One must be able to dream …

3 Likes