The schism between the functional and object-oriented programmers is really a false binary. Yes, the first group argues that FP is superior for a multicore world, while the second insists that OOP is better at matching technical solutions to business problems. However, as this O’Reilly report explains, this is not an either-or proposition.
Technologist Richard Warburton, author of Java 8 Lambas, discusses similarities between these programming paradigms and points out that both FP and OOP are actually moving closer toward one another. One prominent example is the use of lambda expressions in Java and other OOP languages such as C#, C++, and Swift.
By following examples written in Java, you will:
- Learn how lambdas (aka anonymous functions) make OOP languages better suited for dealing with parallelism and concurrency
- Understand how SOLID—OOP’s five basic principles of programming—map to functional languages and paradigms
- Explore some of the most common OOP design patterns—and how they exist in the functional world
Table of contents
- 1. Lambdas: Parameterizing Code by Behavior
- 2. SOLID Principles
- 3. Design Patterns
- 4. Conclusions
- Title: Object-Oriented vs. Functional Programming
- Release date: October 2015
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781491933428
You might also like
40 Algorithms Every Programmer Should Know
Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental …
Java 8 in Action: Lambdas, streams, and functional-style programming
Java 8 in Action Summary About the Book Every new version of Java is important, but …
The Software Architect Elevator
As the digital economy changes the rules of the game for enterprises, the role of software …
Grokking Algorithms is a friendly take on this core computer science topic. In it, you'll learn …