Luke VanderHart has written a nice gist about data modelling in #clojure. I like the distinction between private and public data and also the recommendations for the public data. The main point I'm not entirely convinced of is the strong correlation between public functions and the public data structures: maybe it's just me being lazy, but I'm not using private functions too much.
I guess there is a broader point here to be elaborated on: #clojure provides the :private meta data as a way to signify, well, something akin to encapsulation. However, this is not particular strict, as you can see from the availability of both ns-publics and ns-interns. 2/n
The overall point here is that in #clojure (like in many other languages) the distinction between "public" and "private" might not be as clear cut or simple as it seems. It is likely that a number or even the majority of "public" functions are likely to be actually more implementation details and not intended as a public API (albeit not signified as such by anything). If you think that this is just a lack of discipline, I would half agree but also point to the annoyances that anything declared private brings. 4/5
Which brings me back to my humble and minor disagreement with Luke's gist: for sure, I would agree that his recommendations apply to any public API. But generally asking that all data structures that are needed to call a non-private function should be governed like he describes, seems to me to be too much. #clojure 5/5
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!