Solving Problems the Clojure Way - Rafal Dittwald
Further reading 1
Caption notes
In his 2019 Clojure/north talk, Rafal Dittwald uses a JavaScript card game to explain how to reorganize state and side effects in stages. He suggests reducing the state you keep, concentrating necessary mutations, and deferring external operations such as printing to the edge of the program. The card game separates computing the next turn from reporting it. A shopping-cart example has an event handler return a description of operations for another part of the program to carry out. Dittwald uses the examples to explain why the computation and execution can be tested separately. He also cautions that keeping the whole state history depends on data volume, and that practical projects can still use mutable state where it fits. This guide follows the spoken design approach. The code shown and its execution were not independently verified.
Archived captions (transcription method unspecified) ↗Original passages · 2
a pipeline of input to outputminimizing concentrating and deferring