Compose
Following the path of simplicity and minimal implementation, you’ll naturally end up with distinct, logically independent pieces. If those components are designed to compose cleanly and directly, you can avoid messy, integrated bridge code. Clojure developers tend to value composability for this reason.
Until this becomes second nature, evaluate your code for composability by using it from another component. If you find yourself wading through layer upon layer of wrappers and adapters, you’ll know you fell off the wagon. The result will be a set of tidy interfaces to distinct, independent subsystems with clear communication channels. When a component is self-contained with a stable interface, it can grow easily and adapt quickly.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access