Functional-Light JavaScript is a balanced, pragmatic exploration of Functional Programming in JavaScript. Functional Programming (FP) is an incredibly powerful paradigm for structuring code that yields more robust, verifiable, and readable programs. If you've ever tried to learn FP but struggled with terms like "monad", mathematical concepts like category theory, or symbols like λ, you're not alone. Functional-Light programming distills the most vital aspects of FP—function purity, value immutability, composition, and more!—down to approachable JavaScript patterns. Rather than the all-or-nothing dogmatism often encountered in FP, this book teaches you how to improve your programs line by line.
Kyle Simpson is an Open Web Evangelist from Austin, TX, who's passionate about all things JavaScript. He's an author, workshop trainer, tech speaker, and OSS contributor/leader.
One of the best introduction to FP books. A lot of concepts mentioned in this book are already used in JS quite widely, but here they are analysed and explained in world of functional programming really well. Although I expected more advanced topics, and did not nececesary agreed on all things author mentioned, I still really enjoyed the book. When someone will ask what book yo read to learn about FP, I will definitely recommend this book.
First few chapters were so practical for me, since this is the first book I read regarding what is functional programming. However, I just skimmed through other sections since they were weird to me at the moment. I believe I have to put it aside and get back to it one more time in the future once I become more familiar with FP.
Why did I buy this book?! Because of Kyle Simpson. I remember reading his entire series on JavaScript called, "You Don't Know JS". It was insightful. I stepped up a notch in my JS programming. So, when I saw this new book by Kyle Simpson, I just went for it.
This book is a thorough treatment of how to arrange functions and their parameters in a style where functions flow into other functions. It's written pretty much like a thesis on how to write fluent programs.
This is not an easy read. The reader will definitely have to be prepared by reading "You Don't Know JS" first.
The purpose of this material is to write code in a fluent optimal style that suits other programmers. It's a book for programmers writing libraries for other programmers.
Pragmatic and light-weight, as promised, but I felt the examples were not convincing -- it kind of assumes you already understand and agree with the motivations for writing in a more functional style. YMMV, of course. I got more out of Professor Frisby's guide and videos.
BTW, Loved his "You Don't Know JS" series for Javascript fundamentals, which you should read if you haven't yet.
As with most Functional development books I get so far in them then it just becomes incomprehensible. This book is good, but as I started to get bogged down, the descriptions of what was happening became less useful. The author expected me to deduce the details of what was happening when I wanted the author to explain to me what was happening. I had to abandon it less than half way through because I simply stopped understanding it (and I have 30 years of experience as a software developer).
I read this to help my understanding of functional programming concepts in Javascript. Like other Kyle Simpson books, this was very well written and I learnt a lot from it. I definitely recommend this book to al javascript developers.
Functional-Light JavaScript achieves its intended goal: light insight into functional paradigms with JavaScript. However, it does so with some hypocrisy, praising itself as a practical guide to FP . Yet in all, it fails to illustrate these concepts in any practical manner. This is a common problem with FP oriented literature: there's a lot of heavy focus on the definitive units of FP and the benefits of composition, but little insight into their real-world application. It felt like chapter after chapter of definitions: "here is currying", "here is function composition", "here are array operations", but little information in how these FP-oriented concepts can help the FP-ignorant programmer achieve better code quality. There are real code examples, but at the end of it all I didn't leave with the impression that this was easier/better/intuitive compared to less composition-based approaches.
If you're someone who is familiar with mutating arrays and partial application/composition, this book won't deliver a lot of meaningful value. I learned a few vocabulary terms (currying) as well as new ways of thinking about composition, but I felt as though all of these lessons could have been summarized much more succinctly. In particular, the three chapters on composing functions, and the chapters about immutability, closures, and recursion were much longer than their insights merited.
The theme of this book - a brief overview of FP - could be summarized far more succinctly: "composition and immutability are good, map/filter/reduce are indispensable , and partial application is a useful paradigm". These concepts, and maybe a quick overview of functors/monads could have been done in less than 50 pages. Not 350.
Finished it today. I have to admit that the last chapter will take more study for me to really grok it, but it's already been a good book for me; I've applied some techniques like partial application already.
I liked the introduction to Observables; I teach them with Angular Boot Camp, but this was a new approach.