Functional-Light JavaScript

Balanced, Pragmatic FP in JavaScript
Kyle Simpson
  • May 2019
  • ISBN 9781617296512
  • 381 pages
This title has been retired and is no longer for sale.
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!

Distributed by Manning Publications

This book was created independently by JavaScript expert Kyle Simpson and is distributed by Manning Publications.

about the technology

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.

about the book

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

about the reader

Functional-Light JavaScript is perfect for developers with intermediate JavaScript experience. No experience with functional programming is necessary.

about the author

Kyle Simpson is an avid proponent of the Open Web, who codes regularly on several open source projects. Passionate about all things JavaScript, he's the author of the popular You Don't Know JS book series and has taught JavaScript in corporate and public workshops all over the world. His online training videos have racked up 325,000 watch hours and counting, and he’s a regular speaker at various web/JS conferences.