Cover image for Functional thinking : paradigm over syntax
Functional thinking : paradigm over syntax
Title:
Functional thinking : paradigm over syntax
Author:
Ford, Neal, author.
ISBN:
9781449365516

9781449365486
Personal Author:
Edition:
1st ed.
Physical Description:
xi, 164 p. : ill. ; 24 cm.
General Note:
Includes index.
Contents:
Preface -- Why -- Shifting Paradigms -- Aligning with Language Trends -- Ceding Control to the Language/Runtime -- Concision -- Shift -- A Common Example -- Imperative Processing -- Functional Processing -- Case Study: Number Classification -- Imperative Number Classification -- Slightly More Functional Number Classification -- Java 8 Number Classifier -- Functional Java Number Classifier -- Common Building Blocks -- Filter -- MAPS -- Fold/Reduce -- Synonym Suffering -- Filter -- MAPS -- Fold/Reduce -- Cede -- Iteration to Higher-Order Functions -- Closures -- Currying and Partial Application -- Definitions and Distinctions -- In Groovy -- In Clojure -- Scala -- Common Uses -- Recursion -- Seeing Lists Differently -- Streams and Work Reordering -- Smarter, Not Harder -- Memoization -- Caching -- Adding Memoization -- Laziness -- Lazy Iterator in Java^^^

Totally Lazy Number Classifier -- Lazy Lists in Groovy -- Building a Lazy List -- Benefits of Laziness -- Lazy Field Initialization -- Evolve -- Few Data Structures, Many Operations -- Bending the Language Toward the Problem -- Rethinking Dispatch -- Improving Dispatch with Groovy -- Clojure's "Bendable" Language -- Clojure Multimethods and a la carte Polymorphism -- Operator Overloading -- Groovy -- Scala -- Functional Data Structures -- Functional Error Handling -- The Either Class -- The Option Class -- Either Trees and Pattern Matching -- Advance -- Design Patterns in Functional Languages -- Function-Level Reuse -- Template Method -- Strategy -- The Flyweight Design Pattern and Memoization -- Factory and Currying -- Structural Versus Functional Reuse -- Code Reuse Via Structure -- Practical Thinking -- Java 8 -- Functional Interfaces -- Optional -- Java 8 Streams -- Functional Infrastructure^^^

Architecture -- Web Frameworks -- Databases -- Polyglot and Polyparadigm -- Combining Functional with Metaprogrammmg -- MAPSping Data Types with Metaprogrammmg -- Infinite Streams with Functional Java and Groovy -- Consequences of Multiparadigm Languages -- Context Versus Composition -- Functional Pyramid -- Index.
Abstract:
If you want to take advantage of functional programming features in Java and other languages, this in-depth guide takes you beyond syntax and demonstrates how you need to think in a new way. Software architect Neal Ford shows intermediate to advanced developers how functional coding allows you to step back a level of abstraction so you can see your programming problem with greater clarity. Each chapter shows you various examples of functional thinking, using numerous code examples from Java 8 and other JVM languages that include functional capabilities. This book may bend your mind, but you'll come away with a good grasp of functional programming concepts. Understand why many imperative languages are adding functional capabilities, Compare functional and imperative solutions to common problems, Examine ways to cede control of routine chores to the runtime, Learn how memoization and laziness eliminate hand-crafted solutions, Explore functional approaches to design patterns and code reuse, View real-world examples of functional thinking with Java 8, and in functional architectures and web frameworks, Learn the pros and cons of living in a paradigmatically richer world.
Copies: