Choosing atom, ref, or agent for concurrent state in Clojure
Pick atom for independent synchronous state, ref for coordinated transactional state across multiple values, and agent for asynchronous decoupled work. A compact comparison and practical Clojure examples show when each primitive fits and what to watch for.