Become a Better Developer with Functional Programming

Location: Portland 256
Average rating: ***..
(3.31, 13 ratings)

Functional programming (FP) is undergoing an industry breakout now. First seen as a better approach for concurrency, we’re finding that FP has pervasive benefits, often improving on object-oriented programming (OOP) in many contexts. This session explores how FP aligns with, but also refines developer principles and practices. I’ll focus on the following points:

1. FP is rooted in mathematical rigor, where functions have no side effects and data is immutable. This changes how we approach design, such as how we modularize our code, and it makes testing both easier and more precise, as I’ll demonstrate.

2. Some FP languages have rich type systems, where “correctness” is enforced through the type system, more than through tests. I’ll discuss this powerful concept, but also discuss the challenges of mastering and using such type systems.

3. Code reuse in FP is reuse of functions and data structures. I’ll show how inherent properties of FP-style functions and data structures actually make them easier to reuse than objects. I’ll show why reuse in object-oriented programming hasn’t lived up its promises.

4. FP refactoring is often more like “rewriting”; where we have small, functional modules, we tend to replace them, rather than “tweak” them. (This is the “flip side” of reuse, if you will.)

5. On the surface, FP and OOP seem contradictory, but I’ll demonstrate how they can be complementary.

6. However, FP can be hard to master. I’ll motivate the learning effort required using concrete examples of the benefits to be gained. I’ll help the beginner get started, so she can enjoy the benefits quickly.

7. I’ll choose appropriate examples in a few languages that are easy to understand (after explaining what’s new) to illustrate the key points.

Photo of Dean Wampler

Dean Wampler


Dean Wampler is an expert in streaming data systems, focusing on applications of machine learning and artificial intelligence (ML/AI). He’s head of developer relations at Anyscale, which is developing Ray for distributed Python, primarily for ML/AI. Previously, he was an engineering VP at Lightbend, where he led the development of Lightbend CloudFlow, an integrated system for building and running streaming data applications with Akka Streams, Apache Spark, Apache Flink, and Apache Kafka. Dean is the author of Fast Data Architectures for Streaming Applications, Programming Scala, and Functional Programming for Java Developers, and he’s the coauthor of Programming Hive, all from O’Reilly. He’s a contributor to several open source projects. A frequent conference speaker and tutorial teacher, he’s also the co-organizer of several conferences around the world and several user groups in Chicago. He earned his PhD in physics from the University of Washington.

Comments on this page are now closed.


Picture of Alison Chaiken
Alison Chaiken
07/26/2011 10:48pm PDT

The session was detailed enough to be informative but at a technical level and presentation pace that allowed me to follow along closely. The code examples in the presentation effectively illustrate how any programmer using a modern OO language can employ functional principles even if he/she does not work in one of the functional languages. Wampler spoke clearly, put up very useful slides and answered questions well.

Christopher Villalobos
07/26/2011 4:21am PDT

Seems like the actors are also responsible for all non-functional programming.

Picture of Alison Chaiken
Alison Chaiken
07/26/2011 3:33am PDT

Ooops, now I see the line numbers in the slides, but they were too small (if present) to notice on the projector screen.

Picture of Alison Chaiken
Alison Chaiken
07/26/2011 3:23am PDT

Great so far, although numbers on slides would make jumping in and out much easier when there are 152!