JavaScript Allongé
JavaScript Allongé
Summary:
Introduction
The book "JavaScript Allongé" (author — Reginald Braithwaite, 2019, 520 pages) is not just another syntax reference or collection of recipes. It is a deep dive into functional programming in the JavaScript language, written for those who have already mastered the basics and want to understand how to write clean, expressive, and easily maintainable code. The book's title is a play on words: "allongé" (French for "elongated") refers to the concept of "long" functions and closures, as well as the style of exposition that gradually reveals complex topics.
What this book is about
The book is dedicated to the functional paradigm in JavaScript. Braithwaite consistently guides the reader from basic concepts (functions as first-class objects, closures) to advanced techniques: function composition, currying, partial application, recursion, monads, and working with asynchrony through functional approaches. Special attention is paid to writing code without side effects, using immutable data structures and pure functions. Each chapter contains numerous examples in Node.js that can be run and experimented with immediately.
Who this book is for
The book is intended for programmers already familiar with the basics of JavaScript (variables, functions, objects, arrays) and having at least minimal coding experience. It will be useful for:
- Developers who want to transition from an imperative style to a functional one;
- Those who want to deepen their understanding of closures, scopes, and execution context;
- Programmers striving to write more declarative and testable code;
- People who have already tried functional languages (Haskell, Clojure) and want to apply the same principles in JavaScript;
- Students and teachers studying modern approaches to development.
What the reader will learn
After reading the book, you will be able to:
- Understand and use closures not just as a theoretical concept, but as a tool for creating function factories and encapsulating state;
- Apply function composition to build complex operations from simple ones, avoiding deep nesting;
- Implement currying and partial application to create specialized functions based on general ones;
- Write recursive algorithms with an understanding of tail recursion and optimization;
- Work with monads (Maybe, Either, IO) for safe error handling and side effects;
- Use functional approaches for working with asynchrony (Promise, async/await) without callback hell;
- Build immutable data structures and avoid mutations, making code predictable.
Strengths of the book
The first thing that stands out is the style of exposition. Braithwaite writes vividly, with humor and many metaphors, making complex topics accessible. Each chapter begins with a simple example that gradually becomes more complex, and the author constantly returns to previously introduced concepts, reinforcing them. Second is the practical focus: all concepts are illustrated with code that can be run. Third is the depth: the book is not afraid to venture into the territory of category theory, but does so without excessive mathematical formalism, remaining within the framework of JavaScript. Finally, the structure: 520 pages are divided into small chapters, allowing you to read the book in snippets without losing the thread.
Who it is recommended for
I strongly recommend "JavaScript Allongé" to anyone who wants to go beyond the "jQuery-style" and learn to write truly elegant and maintainable JavaScript. The book will be especially useful for those preparing for interviews at companies that value functional programming (for example, in startups using React/Redux). If you have already read "You Don't Know JS" and want to move