As programmers, we spend the bulk of our time writing code that transforms data from one structure to another. The status quo in languages like Java uses imperative loops that accumulate changes in mutable objects. Functional programming and immutable values offer a different approach with opportunities for composability, concurrency, and simplicity.
In this talk we’ll examine Clojure’s approach to data and data transformation, which is built from a foundation of immutable values and persistent collections. Clojure offers several models for transformation of collections – sequences, reducers, and transducers. We’ll compare these to each other and to the status quo to see how the functional approach results in less code, fewer bugs, and greater reuse.
Alex Miller works on maintaining Clojure and supporting the Clojure community at Cognitect. Last year he published Clojure Applied on Pragmatic Press. Alex is also the founder of the Strange Loop, Clojure/West, and Lambda Jam conferences.