r/Clojure • • May 24 '25
How to start data driven programming?
When reading or listening about clojure, the keyword that comes up more often is data driven programming. However, it's clearly discussed much less over the internet than concepts like OOP, for which you can find explanations and courses in a way too high number of websites. So, how does one get started and familiar with the concepts and practices? I've also checked out the table of contents of clojure for the brave and true and it is not mentioned, at least not explicitly. Are there probably libraries or other open source projects that are particularly good to read to understand it?
EDIT: related questions:
- is data driven programming suited for any kind of software, or is it best suited for something in particular like user-facing applications?
- how similar is it to using react+redux? Thanks
View all comments
Show parent comment
2
u/donald-ball May 24 '25
I work significantly in Go these days and acutely feel that last point. The specific pathologies that pain can present is either a proliferation of boilerplate transformation code or, more commonly in my experience, structs being (ab)used in contexts for which they’re not well-suited — perhaps it’s the structs that correspond to database rows being blessed as the entity models, which presents Problems when you want to make encapsulated changes to the database structure.
I keep toying with the idea of using struct tags, rules, and reflection to provide fns to faciliate transformations between families of structs, but nothing has ever quite satisfied. Generally I throw up my hands and say this is just what you get when you use a perfectly adequate system programming language to write applications!