For information on exhibition and sponsorship opportunities at the convention, contact Sharon Cordesse at email@example.com
Download the OSCON Sponsor/Exhibitor Prospectus
View a complete list of OSCON contacts
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.
Dean Wampler is the architect for fast data products at Lightbend, where he specializes in scalable, distributed big data and streaming systems using tools like Spark, Mesos, Akka, Cassandra, and Kafka (the SMACK stack). Dean is the author of Programming Scala and Functional Programming for Java Developers and the coauthor of Programming Hive, all from O’Reilly Media. He is a contributor to several open source projects and the co-organizer of several conferences around the world and several user groups in Chicago. Dean can be found on Twitter as @deanwampler.
Comments on this page are now closed.