Lift Yourself Up with Functional Thinking

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.

Book Cover
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 Thinking Book
Functional Thinking Videos
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Insider News from the Java Team at Oracle!

duke
Links


Search

Archives
« March 2015
SunMonTueWedThuFriSat
1
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today