Yippee! Java SE 8 has Lambdas and Streams, but what does that mean? Are you now automatically a functional programmer? Learning the syntax of a new language is easy, but learning to think under a different paradigm is difficult. That's where Neal Ford's "Functional Thinking" OSCON session is helpful. Ford is an architect, author and "meme wranger" for ThoughtWorks.
Ford started with the story of the lumberjack who was very good at using an axe. Someone recommended he try a chainsaw because it was so much better. He took the chainsaw, and bashed it against the tree, and concluded he should stick with the axe. The story is apt on so many levels, but especially: the danger of trying the same old thing with new tools. Ford said programmers learn the syntax and concepts of a language at the same time, and they get tend to get the two entwined in their minds. So, becoming a functional programmer is not so much learning new syntax, but thinking about problems and their solutions differently. Ford explained that as a functional programmer, you need to focus on results, not steps.
How is Functional Programming different than imperative programming? FP is a cleaner, more effective way to solve problems. FP has you working at a higher level, it makes you more productive, and it has you thinking at the problem level. With FP, the problem solution reads like the problem statement. Teasing apart the parts of a problem also makes it easier to parallelize your code. With FP, you can lift yourself up, think more abstractly about your programming. Also, you can let the runtime handle the busy work of memory allocation ("Life's too short for malloc!" Ford exclaimed), garbage collection and variable state. You'll be more productive.
Functional Programming is more a way of thinking than a toolset. Get your thinking on with these resources:
Functional ThinkingBook
Functional Thinking Videos
Course: Learning Functional Programming Principles in Scala (Courera)
Article: "A Functional Programming Crash Course for Java Developers" (SD Times)
Academic Paper: Crossing the Gap from Imperative to Functional Programming through Refactoring (PDF)
Neal Ford on Twitter: @Neal4d
Academic Paper: Crossing the Gap from Imperative to Functional Programming through Refactoring (PDF)
Neal Ford on Twitter: @Neal4d