0%

Book Description

Level up your skills by taking advantage of Clojure's powerful macro system. Macros make hard things possible and normal things easy. They can be tricky to use, and this book will help you deftly navigate the terrain. You'll discover how to write straightforward code that avoids duplication and clarifies your intentions. You'll learn how and why to write macros. You'll learn to recognize situations when using a macro would (and wouldn't!) be helpful. And you'll use macros to remove unnecessary code and build new language features.

Table of Contents

  1. Mastering Clojure Macros
    1. Copyright
    2. For the Best Reading Experience...
    3. Table of Contents
    4. Early Praise for Mastering Clojure Macros
    5. Acknowledgments
    6. Introduction
      1. Why Clojure?
      2. Why Macros?
      3. Metaprogramming in Non-Lisps
      4. Who Is This Book For?
      5. What’s in This Book?
      6. How to Read This Book
      7. Online Resources
    7. Chapter 1: Build a Solid Foundation
      1. Code Is Data
      2. Transforming Code
      3. Evaluating Your First Macro
      4. Macroexpansion
    8. Chapter 2: Advance Your Macro Techniques
      1. Syntax-Quoting and Unquoting
      2. Approaching Hygiene with the Gensym
      3. Secret Macro Voodoo
    9. Chapter 3: Use Your Powers Wisely
      1. Macros Aren’t Values
      2. Macros Can Be Contagious
      3. Macros Can Be Tricky to Get Right
    10. Chapter 4: Evaluate Code in Context
      1. Dynamic Bindings
      2. Evaluating (or Not) in Time and Place
      3. Rescuing Errors
      4. Cleaning Up Resources
    11. Chapter 5: Speed Up Your Systems
      1. Benchmarking Your Code
      2. Hiding Performance Optimizations
      3. Moving Execution to Compile Time
    12. Chapter 6: Build APIs That Say Just What They Mean
      1. Compojure
      2. Clojure Koans
      3. Decoupling Macros from Functions
    13. Chapter 7: Bend Control Flow to Your Will
      1. Loops and Loops and Loops and…
      2. Turning Expressions Inside Out with Threading Macros
      3. Delimited Continuations
    14. Chapter 8: Implement New Language Features
      1. Implementing Pattern Matching
      2. Error Handling in Macros
      3. Code-Walking Macros
      4. Macros Are [Not ] Magic
    15. Bibliography
      1. You May Be Interested In…
3.144.119.170