Functional-Light JavaScript: Balanced, Pragmatic FP in JavaScript

Functional-Light JavaScript: Balanced, Pragmatic FP in JavaScriptReviews
Author: Kyle Simpson
Pub Date: 2019
ISBN: 978-1981672349
Pages: 381
Language: English
Format: PDF/EPUB
Size: 12 Mb


Functional programming (FP) is a powerful coding style for creating programs that are modular, reusable, concise, and easy to read, test, and debug. For developers used to a procedural style, however, the unfamiliar terminology and mathematical notations can seem daunting at first. Functional-Light JavaScript eases you into FP, covering the concepts, terminology, and practices that give you the greatest benefit. It takes a practical approach to the most important aspects of FP—function purity, value immutability, composition, and more—with a focus on applying what you learn. Through engaging instruction and crystal-clear JavaScript examples, you’ll learn this game-changing programming style from the ground up!
Based on the sound mathematical principle of composing independent units of reliably correct code into computational systems, functional programming offers substantial benefits for the long-term reliability of your applications. The style emphasizes modularity, reusability, and ease of testing and debugging. Because each function in the system is provably correct by design, your code is verifiable, reliable, and free of many common bugs associated with state and scope.
Functional-Light Programming (FLP) is an approach pioneered by author Kyle Simpson, with JavaScript in mind. This technique distills all the most beneficial parts of FP—including function purity, composition, closure, immutability, iterations, recursion, and others—into practical patterns that you can easily learn without getting bogged down by complex terminology, symbology, or overly strict adherence to principles.
Functional-Light JavaScript teaches you to apply the core principles of FP to your JavaScript code, with a balanced, pragmatic approach. In his friendly, informal style, author Kyle Simpson walks you through the basic concepts of FP, like trust, communication, readability, and perspective. You’ll learn the nature of functions, how to manage function inputs, and how to reduce side effects with pure functions. You’ll also explore value immutability, closure, recursion, and list operations like map, reduce, and filter.
With the foundational concepts securely under your belt, you’ll advance to asynchronous processing concepts, including managing time as state, reducing time dependencies, eager versus lazy processing, Observables, and Promises. Every chapter wraps up with a clear and concise summary, locking in your new knowledge. In the final chapter, you’ll discover a complete application that ties together everything you’ve learned, including clearly explained code. When you’re done reading this invaluable book, you’ll have the FP skills you need to write programs that yield all the benefits of this powerful coding style, including taking your software career to the next level!
What’s inside

  • Reducing side effects with pure functions
  • Eager versus lazy processing
  • Function composition
  • Value immutability
  • Recursion
  • Closure
  • List operations, including map, filter, and reduce
  • Asynchronous FP principles