A Functional Perspective

Clojure is a functional language. This makes it extremely well positioned for writing modern applications. As the application grows, it’s imperative to be able to reason about parts of the application in isolation. It’s equally important to have code that is testable and reusable. Let’s take a look at the aspects of functional programming that facilitate these qualities.

Managing State

Functional languages are ideal for writing large applications because they eschew global state and favor immutability as the default. When the data is predominantly immutable, we can safely reason about parts of the application in isolation.

“Immutable data structures” might sound like a strange idea at first. However, many of the benefits ...

Get Web Development with Clojure, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.