Section 4: Idiomatic ClojureScript
ClojureScript is more than just an alien syntax for writing JavaScript. It is a well-designed language with its own idioms and best practices. In the first three sections, we approached ClojureScript in a way that made it as familiar as possible to JavaScript programmers. However, in order to become as effective as possible with the language, we need to learn how to write idiomatic ClojureScript. First, we will consider learn how to write pure, well-factored functional programs that operate on immutable data. Next, we’ll finally learn how to deal with state that changes over time, which will be a critical component to most of the applications that we build. Then, we will learn about namespaces - the unit of modularity - and how to effectively lay out a larger project. After learning about program structure, we will look at our options for dealing with when things go wrong. Finally, we will learn the basic of working with ClojureScript’s default concurrency model and the core.async library that implements this model. The capstone will lean on all of these concepts to create a group chat application.